I’ve created small database under SQL Server 2008. Now i wanted to move it to SQL Server 2005 and it doesn’t work since it doesn’t have Time datatype. What option do I have to store only time in SQL Server 2005. I’ve written small TimeSheet application which needs to write hours and minutes mostly in format like 05:30:00 (hh:mm:ss) but ss is optional.
I’ve created small database under SQL Server 2008 . Now i wanted to move
Share
SQL Server 2005 does support the DATETIME datatype, which also includes time. To store only the time, you can use the CONVERT statement:
It’s not optimal, because the date part is not used, but still takes up storage space. But then again, downgrading a database to a previous version never is optimal.