Quote:
Is it a best pratice to save time values into int fields?
Pretty much, yes.
If you store DateTime as raw text, it can consume up to 17-18 bytes if you want millisecond precision. If you use "ticks" (an internal representation where 1 tick = 1000 ms), you can store a large range of values in only 8 bytes.
Internally, MS products (can't speak for *nix) have used 8 bit integer tick counts for representing time values for some time. The ease of doing date arithmetic with this format is obvious - you only have to make sure you have robust conversion routines, and do integer arithmetic, rather than worrying about seperate math routines for different calendar systems etc.
It's also rather more compact than using a string representation, so many database systems will use this method. One notable exception I've discovered recently is SQLite, which by default uses ISO 8601 strings to represent dates.
In the case of TimeSpan, this is an expression of magnitude, and not a discrete Time value. In particular, it makes no sense in a DateTime field, because it can hold negative values which would break the unsigned integer representation used. You could format it as an ISO 8601 duration string, but that again would be more bulky.
If you want Time, the best way is to use the DateTime struct and ignore the Date component, or to write your own Time struct. SQLite wins here in terms of storage space ; because it uses ISO8601 it can represent times down to the second in 7 bytes or less (6 chars plus one byte overhead).