Time Conversion

S

stan

I'm needing help converting a number to a time. I have
an integer ,such as 54299430, that represents the number
of minutes that has passed since 12/30/1899. I'm needing
to convert this to the actual time it represents (ie:
2:41 pm) I'm need a VBA function that I can re-use in
queries.

Any help you can provide would be greatly appreciated!

Thanks!
 
S

stan

Thanks Bruce. The code is working from a date
perspective but isn't returning the correct time. Is it
possible to correct this?
 
B

Bruce M. Thompson

Thanks Bruce. The code is working from a date
perspective but isn't returning the correct time. Is it
possible to correct this?

Is the returned time always off by the same amount? As I said, the value and
time you provided were not in sync. If it's always off by the same amount, you
can simply pad the returned time value using the "DateAdd()" function to add or
subtract the difference.
 
S

stan

Each date/time returned is over by exactly 5 hours. I
just subtacted 5 hours and it gives me what I want.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top