Handling Time Zones and Daylight Saving Time in SQL Server

preview_player
Показать описание
Working with different time zones and daylight saving time with SQL Server *can* be pretty easy with AT TIME ZONE...if you set your data up correctly. In this video we talk about the time zone of various data types and how to make sure your AT TIME ZONE conversions work as expected.

Related blog post with example code:

Follow me on Twitter:
Рекомендации по теме
Комментарии
Автор

This is a great channel! I was trying to find a good explanation on this weeks ago and couldn't anywhere. I thought for sure I was doing something wrong when I had to do at time zone twice.

AdamMarcus
Автор

AWESOME the only simple explanation of this I could find, exactly what I needed, thanks.

DigitalNomadOnFIRE
Автор

Thanks Bert! First time i've seen a use case for the datetimeoffset datatype.

Reitseschaatser
Автор

Pretty good videos greatly professional.

cgovea
Автор

That was the reason to store time in UTC.... regardless of client accessing the database...

stefanotorelli
Автор

Did you intend that the two datetime values were only different by one minute?  If so, I think your second datetime value should have been on March 10, instead of the March 19 you have in the video.

LarryZing
Автор

how do you calculate the offset? I mean, how can I convert this 2022-05-01 10:00:00 -05:00 into 2022-05-01 05:00:00 ??

ChrisCollao
Автор

i have 5 databases with same tables but different name, one table called company_tbl, how to show database name and company_name from company_table

robinb
Автор

Its not working, both dates showing Same.
E. Australia Standard Time

qqqpk