Wednesday, March 7, 2012

only show days in datetime

hi
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?
Helenayou 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

No comments:

Post a Comment