Time Conversion

  • Thread starter Thread starter stan
  • Start date Start date
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!
 
Thanks Bruce. The code is working from a date
perspective but isn't returning the correct time. Is it
possible to correct this?
 
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.
 
Each date/time returned is over by exactly 5 hours. I
just subtacted 5 hours and it gives me what I want.
 
Back
Top