Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««1234»»»

Date Conversions Expand / Collapse
Author
Message
Posted Wednesday, June 6, 2012 7:06 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 8:56 PM
Points: 13,078, Visits: 12,529
Agreed that the formatting was a bit challenging but a great question. Thanks Lynn!!!

_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Post #1311835
Posted Wednesday, June 6, 2012 7:12 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Wednesday, September 19, 2012 8:39 AM
Points: 595, Visits: 1,226
Great question.

SQL noir: Things aren't always what you expect.


Converting oxygen into carbon dioxide, since 1955.

Post #1311842
Posted Wednesday, June 6, 2012 7:19 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Yesterday @ 7:17 AM
Points: 1,918, Visits: 1,438
I'm agreeing with what most people have put up before myself. Great question, it really made me think, but the answer format played some tricks on my brain this early in the morning.



Everything is awesome!
Post #1311852
Posted Wednesday, June 6, 2012 8:27 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 6:26 PM
Points: 20,732, Visits: 32,496
Okay, I should have used the DATE data type for the question, then I could have left the time portion off the answers.



Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Post #1311901
Posted Wednesday, June 6, 2012 8:31 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 6:26 PM
Points: 20,732, Visits: 32,496
sestell1 (6/6/2012)
That's a bit frightening. Good to know. I'm glad I've never run into this!


That's why I submitted this question. I'm sure at some point that someone is going to run into this and wonder why it isn't working the why they think it should. By making people aware of the differences in behaviour of the different date/time data types, hopefully this won't happen.



Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Post #1311902
Posted Wednesday, June 6, 2012 8:36 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Thursday, October 2, 2014 6:57 PM
Points: 2,315, Visits: 1,362
Thanks Lynn, that certainly is good to know.
Post #1311906
Posted Wednesday, June 6, 2012 9:12 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, January 31, 2013 8:53 AM
Points: 1,176, Visits: 778
great question Lynn - something I had not encountered so great lesson for me here! cheers
Post #1311934
Posted Wednesday, June 6, 2012 9:27 AM


SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Friday, May 2, 2014 4:11 PM
Points: 645, Visits: 377
Now I know why this question is worth 2 points:

One point is for the question per se.
The other point is due for the high grade of difficulty on read the answer options

Good excercise for the eyes too, but now I need a glasses with more gain
Post #1311946
Posted Wednesday, June 6, 2012 9:54 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Wednesday, October 1, 2014 10:48 AM
Points: 4,126, Visits: 3,427
1 minute of thinking, 10 minutes of looking for the right answer among those offered... But a nice question, anyway - thanks, Lynn!
Post #1311972
Posted Wednesday, June 6, 2012 11:52 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, October 14, 2014 10:24 AM
Points: 72, Visits: 271
I would like to hear a SQL philosopher/historian explain how this situation came about. It seems such a violation of language orthogonality - lying in wait to create bad data.
Post #1312070
« Prev Topic | Next Topic »

Add to briefcase ««1234»»»

Permissions Expand / Collapse