In The Beginning

  • 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:

  • 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');

  • 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).

  • 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.

  • 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. 😀

  • "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

  • 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

  • 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... 🙁

  • 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:

  • 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!

  • 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.

  • 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.

  • Simple and nice informative question!!

    Thanks.

  • 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.

  • 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