A way to store time without seconds in SQL Server -


i want save time in sql server database in format:

hh:mm 

and not this:

hh:mm:ss 

is possible? there unique data type (i tried go on list of data types failed find; tried search on msdn , didn't find). there way? not want second stored.

if you're using sql-server 2008+ , can use time type , reset seconds , ignore them while selecting.

if not, can consider saving them strings(extract hh:mi) or integers(counting minutes after 00:00). @destination-data said, should note won't able use time functions available sql-server, able convert them date if necessary .


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -