Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2003

    Cool Unanswered: only show days in datetime

    I want to search for documents created between different dates. Therefore I want to store a date in the format yyyy-mm-dd, but the databases store it as yyyy-mm-dd 00:00:00.000
    how do I get rid of the hours and minutes?

  2. #2
    Join Date
    Apr 2002
    Toronto, Canada
    you cannot get rid of them, they are part of the datatype

    store your date values without a time component, and then when you search for a date range, you'll be fine

    the only way people get into trouble is when they store values like getdate() which include an actual time | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts