November 25, 2014 at 7:20 am
Mike Hays (11/25/2014)
I could swore that it was sometime in 1975?
So you've never stored a date prior to 1975 in a DATETIME? :blink:
November 25, 2014 at 7:25 am
paul.knibbs (11/25/2014)
Mike Hays (11/25/2014)
I could swore that it was sometime in 1975?So you've never stored a date prior to 1975 in a DATETIME? :blink:
Or what that your personal beginning of time?
select DATEADD(week, -38, '01/01/1975');
November 25, 2014 at 7:40 am
Maybe its me. Once I had BASIC loaded on my Altair 8800, I can not seem to remember anything before that (like my wedding, children being born, Jets winning the Super Bowl).
November 25, 2014 at 7:48 am
Mike Hays (11/25/2014)
Maybe its me. Once I had BASIC loaded on my Altair 8800, I can not seem to remember anything before that (like my wedding, children being born, Jets winning the Super Bowl).
The Jets? LOL! As if THAT could have ever happened.
November 25, 2014 at 7:51 am
Thanks for the nice, easy question, Sean.
Another good option for the list of choices would have 0001-01-01, which is the earliest date for a DateTime2 data type.
I thought that perhaps 1975-04-04 was Steve Jones' birthday. 😀
November 25, 2014 at 7:52 am
"3114 B.C. is the start of the Mayan calendar."
I wonder whether the Mayans used "May-SQL" 😀
- webrunner
-------------------
A SQL query walks into a bar and sees two tables. He walks up to them and asks, "Can I join you?"
Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html
November 25, 2014 at 7:53 am
I love the error that is thrown trying to generate any date prior to 1753 from a datetime data type.
Adding a value to a 'datetime' column caused an overflow.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
November 25, 2014 at 7:54 am
Mike Hays (11/25/2014)
Maybe its me. Once I had BASIC loaded on my Altair 8800, I can not seem to remember anything before that (like my wedding, children being born, Jets winning the Super Bowl).
Hmm, maybe that's why I can't remember the Vikings ever winning the Super Bowl. Oh, wait... 🙁
November 25, 2014 at 7:55 am
webrunner (11/25/2014)
"3114 B.C. is the start of the Mayan calendar."I wonder whether the Mayans used "May-SQL" 😀
- webrunner
+1 :w00t:
November 25, 2014 at 8:10 am
I see so many posts thanking the Author for an easy question.
I also see 49% of the answers are for 1900-01-01....
Human Irony and Dichotomy United!
November 25, 2014 at 8:12 am
Brian.Klinect (11/25/2014)
That's exactly what I did. I had no idea I could use a negative number for a datetime!
Since DateTime is stored as an Integer, it only makes sense to use the Positive and Negative Values.
Anything thing else would be wasteful.
November 25, 2014 at 8:32 am
PHYData DBA (11/25/2014)
Brian.Klinect (11/25/2014)
That's exactly what I did. I had no idea I could use a negative number for a datetime!Since DateTime is stored as an Integer, it only makes sense to use the Positive and Negative Values.
Anything thing else would be wasteful.
Actually, it's stored as two integers. The first one is the date and the second one is the time. I completely agree that not using the full range of the date integer would be wasteful. It's actually pretty efficient and works well.
November 25, 2014 at 8:52 am
Simple and nice informative question!!
Thanks.
November 25, 2014 at 10:15 am
Ed Wagner (11/25/2014)
PHYData DBA (11/25/2014)
Brian.Klinect (11/25/2014)
That's exactly what I did. I had no idea I could use a negative number for a datetime!Since DateTime is stored as an Integer, it only makes sense to use the Positive and Negative Values.
Anything thing else would be wasteful.
Actually, it's stored as two integers. The first one is the date and the second one is the time. I completely agree that not using the full range of the date integer would be wasteful. It's actually pretty efficient and works well.
Actually, it is stored as a float. The whole number is the date and the fraction is the time.
November 25, 2014 at 10:54 am
Yep, that's me, guilty, not reading the question thoroughly and not getting my coffee first.
Viewing 15 posts - 16 through 30 (of 39 total)
You must be logged in to reply to this topic. Login to reply