Software Development Network>> SQL Server>> Just the time...
Datetime is the only "temporal" format in SQL Server (that you can then use with Datediff, Datepart, etc).What you may want to consider, since you're storing a duration, is to use something like an int field, and store the duration as a matter of units. For example, if your base unit is seconds, and you have a duration of 2 hours, 16 minutes, 32 seconds, then store: 2*3600 + 16*60 + 32 = 8192 seconds.btw--those are just random numbers out of my head, but how neat that it came out to be 8K exactly!Or, you could always just store the time as a string (varchar).
Just the time...
RickLa
Datetime is the only "temporal" format in SQL Server (that you can then use with Datediff, Datepart, etc).
What you may want to consider, since you're storing a duration, is to use something like an int field, and store the duration as a matter of units.
For example, if your base unit is seconds, and you have a duration of 2 hours, 16 minutes, 32 seconds, then store: 2*3600 + 16*60 + 32 = 8192 seconds.
btw--those are just random numbers out of my head, but how neat that it came out to be 8K exactly!
Or, you could always just store the time as a string (varchar).
-=B3N=-
Cheers,
Roy