Convert number to time

F

Floyd Forbes

I have field with numbers like 28815. How do I convert this number to
8:00:15 AM time format.
Is there an easy way to convert numbers to time?

Floyd
 
B

Bob Barrows [MVP]

Floyd said:
I have field with numbers like 28815. How do I convert this number to
8:00:15 AM time format.
Is there an easy way to convert numbers to time?

Floyd
Could you show a few more examples? For instance, how is a PM time
represented?

With this specific example, you would use string functions to parse out the
hours and minutes and use timeserial to convert it to time:

MyTime: TimeSerial(Mid([fieldname],3,1),right([fieldname].2),0)

but this will likely not be adequate for all your data.
 
Top