June 2, 2011 at 1:18 pm
SQL Server only has datetime. Can just the date without time be stored in the datetime ? Please let me know how to handle this.
Thank you
June 2, 2011 at 1:25 pm
In SQL 2008, there's a Date datatype that can do this. In 2005 and before, the usual thing to do is store a date with midnight as the time.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
June 2, 2011 at 1:29 pm
How to do that? Thank you
June 2, 2011 at 1:38 pm
How do you do what? Store a date with midnight as the time? That'll depend on how you're getting the data into the table. What does your application do?
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply