I’m developing an application using Java (J2SE).
I need to store a Time in database (e.g. 16:30:12).
When I need to store date (Or date+time) I convert it to Unix timestamp and I store it as a Long number.
But When i need only the Time and not the Date and Time what is the best way to store it?
I’m Using SQLite and MS Access as DBMS.
Thanks
It’s ok to store time as time-in-milliseconds from null-date (January 1, 1970, 00:00:00 GMT).
You will be able easily made compare operations on this long data field in the DB.