Sql server® 2012 t-sql fundamentals



Download 10,93 Mb.
Pdf ko'rish
bet130/443
Sana26.01.2022
Hajmi10,93 Mb.
#411755
1   ...   126   127   128   129   130   131   132   133   ...   443
Bog'liq
BookSQL

The 

TODATETIMEOFFSET

 Function

The TODATETIMEOFFSET function sets the time zone offset of an input date and time value.



Syntax

TODATETIMEOFFSET(date_and_time_valuetime_zone)

This function is different from SWITCHOFFSET in that its first input will usually be a date and time 

type that is not offset aware. This function simply merges the input date and time value with the 

specified time zone offset to create a new datetimeoffset value. 

You will typically use this function when migrating non-offset-aware data to offset-aware data. 

Imagine that you have a table holding local date and time values in an attribute called dt of a 

DATETIME data type and the offset in an attribute called theoffset. You then decide to merge the 

two to one offset-aware attribute called dto. You alter the table and add the new attribute. Then 

you update it to the result of the expression TODATETIMEOFFSET(dt, theoffset). Then you can 

drop the two existing attributes dt and theoffset.



The 

DATEADD

 Function

The DATEADD function allows you to add a specified number of units of a specified date part to an 

input date and time value.

www.it-ebooks.info




84  

Microsoft SQL Server 2012 T-SQL Fundamentals



Syntax

DATEADD(


Download 10,93 Mb.

Do'stlaringiz bilan baham:
1   ...   126   127   128   129   130   131   132   133   ...   443




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish