Literal Dates

  • Comments posted to this topic are about the item Literal Dates

    ____________________________________________________

    Deja View - The strange feeling that somewhere, sometime you've optimised this query before

    How to get the best help on a forum

    http://www.sqlservercentral.com/articles/Best+Practices/61537
  • Nice question ...

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • Good question dude.. I got something today.. Expecting these types of more questions from you.. Thanks..

  • Selected the right answer, then changed my mind. Damn you Monday!

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • This was removed by the editor as SPAM

  • This is why I always write date literals in the form 'yyyymmdd' without separators.

    Getting others to realise the importance of doing so is another story.

  • Great question for a Monday, not too easy to get the brain matter warmed up, thanks.

    _____________________________________________________________________
    [font="Comic Sans MS"]"The difficult tasks we do immediately, the impossible takes a little longer"[/font]

  • Thanks for the question Mark! I got the right answer for the wrong reason, so I benefited doubly from the question - got rid of bad data and replaced it with good.

    [font="Verdana"]Please don't go. The drones need you. They look up to you.[/font]
    Connect to me on LinkedIn

  • craig 81366 (7/23/2012)


    This is why I always write date literals in the form 'yyyymmdd' without separators.

    Getting others to realise the importance of doing so is another story.

    +1

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • craig 81366 (7/23/2012)


    This is why I always write date literals in the form 'yyyymmdd' without separators.

    Getting others to realise the importance of doing so is another story.

    +1

    Thanks for the great question, Mark-101232!

  • Thanks for the QotD, it's a good refresher on the behavior differences between DATETIME and DATE datatypes.

    Cheers,

    Andre Ranieri

  • Good question but I couldn't see the difference in the 2 date formats and selects until well into my second cup of coffee.

  • Seems very similar to another we had recently.

    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

  • Great warmup for reality. Engaged mind before answered and +1.

    Thanks!

    Not all gray hairs are Dinosaurs!

  • tks for the question - cheers

Viewing 15 posts - 1 through 15 (of 23 total)

You must be logged in to reply to this topic. Login to reply