Separate date and time datatypes - come on guys!
Chris Lerew
I'm asking for the SIMPLEST implementation possible - a date datatype that only includes the year, month, and day and a time datatype that only includes hours, minutes, seconds, and milliseconds. So that would give SQL Server a total of 4 native date-related types - datetime, smalldatetime, date, and time. The CLR should not be a factor in this implementation since it should be EASILY accomplished natively in SQL Server. I really could care less about timezones.
If I had to choose, I would probably pick an isolated time datatype as more critical. The following are just a few of the real-world examples where I could have used an isolated time datatype when developing a system, but had to hack a workaround.
1) Period (bell) schedule for a public school system. Dates are irrelevant as part of the schedule because students change classes at specific times depending on the day of the week. The bell schedule only has the potential for revision at the end of each year.
2) Hours of operation for a business.
3) Time range for sessions at corporate training seminars.

Separate date and time datatypes - come on guys!
vmadan16
--
Adam Machanic
Pro SQL Server 2005, available now
http://www..apress.com/book/bookDisplay.html bID=457
--
Gary D
asmana
Ad-hoc'ing a getdate() on 2K5, it seems that this behavior is still the same. I know from an accounting perspective having a millisecond that isn't really a millisecond (due to the rounding) can be bad, mmkay.
GapIT
The SQL Server Team is discussing post-2005 plans right now, and I think either new product features or samples along the lines you have requested would make a good addition to a future release. Thank you for helping us to make our products better.
--Bonnie
Ted Wagner
I agree Time data type would be very useful -- no date association, no timezones, just points in a 24 hour period. I can work around Date by rounding off the time.
A "big" DateTime data type that goes back prior to 1753 would also be very useful. That limitation has been rather painful on a few projects. Oracle's DATE implementation would be fine.
Martin Skibye
Liqun
Thanks for your constructive feedback. We are currently looking into this. For now, this is a perfect use case for using the embedded CLR type mechanism to define your own date and time datatypes.
Now while we have your attention, could you please provide us your preferences regarding:
1. Do you want us to provide Timezones
2. Preserve timezones
3. Default non-timezone values to timezones
4. Support the year 0 or not (ISO 8601 - the date and time standard - has changed its opinion on this)
5. Are leap-seconds important for you
Your feedback is appreciated.
Best regards
Michael
Yaachiru
--
Adam Machanic
Pro SQL Server 2005, available now
http://www..apress.com/book/bookDisplay.html bID=457
--
meetshums
melody45
--
Adam Machanic
Pro SQL Server 2005, available now
http://www..apress.com/book/bookDisplay.html bID=457
--
Piotr Trochimiuk
Your proposal is what we currently recommend.
We are looking into providing date and time types in an upcoming version of SQL Server. Note that we have to however provide a solution that is more general since timezones are essential in the international market and the issues that I mentioned earlier are issues for which we have a usable answer. Otherwise we end up with another 20 types in future releases...
Best regards
Michael
VirusFree
--
Adam Machanic
Pro SQL Server 2005, available now
http://www..apress.com/book/bookDisplay.html bID=457
--
Russ Monckton
I'm assuming you mean the TimeStamp type which is referenced as @@DBTS and is not the same as the getdate() function, nor will it work for imported data where the millisecond gets 'rounded'...
Thanks though.