SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


DateTime Functions


DateTime Functions

Author
Message
OzYbOi d(-_-)b
OzYbOi d(-_-)b
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1346 Visits: 778
good question - cheers
yannick.dinger
yannick.dinger
SSC-Enthusiastic
SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)

Group: General Forum Members
Points: 104 Visits: 38
learn something new today :-)
EL Jerry
EL Jerry
Hall of Fame
Hall of Fame (4K reputation)Hall of Fame (4K reputation)Hall of Fame (4K reputation)Hall of Fame (4K reputation)Hall of Fame (4K reputation)Hall of Fame (4K reputation)Hall of Fame (4K reputation)Hall of Fame (4K reputation)

Group: General Forum Members
Points: 3988 Visits: 1345
Good question, Steve. I like this kind of questions where I have to read and learn new things.

"El" Jerry.

"El" Jerry.

"A watt of Ottawa" - Gerardo Galvan

To better understand your help request, please follow these best practices.
mtassin
mtassin
SSCarpal Tunnel
SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)

Group: General Forum Members
Points: 4804 Visits: 72518
Thanks for an easy one.

I personally love this data type... it makes dealing with multi-time zone data a little bit easier.... datetime data still gives me more headaches than any other.

"Ok Ms. Smith we'll schedule a callback at 3pm your time in California on Friday"

Ok so she's in a portion of California that doens't follow DST, we're in Chicago and we do.

Is Friday in or out of DST? Do we know her correct TZ? What about when our east coast support team decides to handle this one?

*sigh*

Headaches I tell you... Smile



--Mark Tassin
MCITP - SQL Server DBA
Proud member of the Anti-RBAR alliance.
For help with Performance click this link
For tips on how to post your problems
Steve Jones
Steve Jones
SSC Guru
SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)

Group: Administrators
Points: 62450 Visits: 19102
Glad you liked this one. It was one that taught me something when I wrote it.

Follow me on Twitter: @way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
Ken Wymore
Ken Wymore
SSCertifiable
SSCertifiable (5K reputation)SSCertifiable (5K reputation)SSCertifiable (5K reputation)SSCertifiable (5K reputation)SSCertifiable (5K reputation)SSCertifiable (5K reputation)SSCertifiable (5K reputation)SSCertifiable (5K reputation)

Group: General Forum Members
Points: 5048 Visits: 2373
Nice question Steve, learned something new today.
TomThomson
TomThomson
SSChampion
SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)

Group: General Forum Members
Points: 14290 Visits: 12197
mtassin (4/5/2012)
Thanks for an easy one.

I personally love this data type... it makes dealing with multi-time zone data a little bit easier.... datetime data still gives me more headaches than any other.

"Ok Ms. Smith we'll schedule a callback at 3pm your time in California on Friday"

Ok so she's in a portion of California that doens't follow DST, we're in Chicago and we do.

Is Friday in or out of DST? Do we know her correct TZ? What about when our east coast support team decides to handle this one?

*sigh*

Headaches I tell you... Smile

+1 on that. I wish I'd had this data type and this function years back. We had customers in 4 time zones raging from +05:30 to -06:00.

Tom

wodom
wodom
Old Hand
Old Hand (300 reputation)Old Hand (300 reputation)Old Hand (300 reputation)Old Hand (300 reputation)Old Hand (300 reputation)Old Hand (300 reputation)Old Hand (300 reputation)Old Hand (300 reputation)

Group: General Forum Members
Points: 300 Visits: 256
Something seems contradictory in the answer to this question. First it says the answer is 2012/04/05 11:00:00 +05:00. Then in the explanation it says the GMT time of the result is 2012/04/05 11:00 (in other words, the answer is 2012/04/05 11:00 +00.00).

Well those two times are 5 hours apart, so they both can't be right.



Britt Cluff
Britt Cluff
SSCommitted
SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)

Group: General Forum Members
Points: 1801 Visits: 253
Good straightforward question. Thanks for submitting.

http://brittcluff.blogspot.com/
Chris Umbaugh
Chris Umbaugh
SSC Veteran
SSC Veteran (288 reputation)SSC Veteran (288 reputation)SSC Veteran (288 reputation)SSC Veteran (288 reputation)SSC Veteran (288 reputation)SSC Veteran (288 reputation)SSC Veteran (288 reputation)SSC Veteran (288 reputation)

Group: General Forum Members
Points: 288 Visits: 241
Good question. Never used this data type before but I have a project coming my way soon where I may be able to leverage datetimeoffset. Very "timely" har har. Thanks.

Chris Umbaugh
Data Warehouse / Business Intelligence Consultant
twitter @ToledoSQL
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search