Converting Times & Dates

GrahamK

Registered User.
Local time
Today, 04:17
Joined
Aug 5, 2008
Messages
25
Hi All,

I've got an SQL table which has a start time, and start date filed in it, the format of the time is 01/01/1900 08:00:00 and the date format is eg 28/08/2009 00:00:00 - it's an awful way of doign it, but thats what in our product!

I'm trying to convert the start time to HH:MM but every time I try I get 00:00 as the result.

Can anyone perhaps help me get a result out of the darned thing!

Many Thanks
Graham
 
It is just the way Access and SQL Server keep dates and times as a number of days with times as the part of a day.
Most databases do it this way. For some other databases a day in 1964 is the zero day.

Date and Time field are stored as numbers. They are displayed depending on your settings.

If it is in the table it doesn't really matter anyway because your users should never see a naked table.
Just change the table field format or control format to either Short or Medium Time. It is in the properties.

It is actually handy because you can just add and subtract dates and times to get such values as the elapsed period in days or part there of.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom