Question Time Formats / Input Masks

PaulO

Registered User.
Local time
Today, 15:25
Joined
Oct 9, 2008
Messages
421
I've been capturing times in the format hh:mm:ss for some time now, and performing detailed calculations with this data. I now need to capture the seconds element of each time in hundreths rather than round seconds.

I've looked at variables available using Input Masks and can't see a format such as hh:mm:ss.ss, are there any other options available to me?
 
Long winded solution, but should work.....

Use DateValue to get the serial number. This should have digits to the right of the decimal place.

E.g. 9th Oct 2008 14:12:00.345 = 39730.591671

If you used the Int to remove the bit to the left
eg myDate = DateValue(#09/10/2008 14:12#) 'I use dd/mm/yy format
mySerial = mydate - int(mydate)

mySerial should now contain 0.591671

Multiply this by 24 * 60 * 60 to convert to seconds (or 86400)

0.591671 * 86400 = 51120.345

Again subtract the INT component and you are left with 0.345, which is the hundreths.

Horrible way to go about it, but it does get there

HTH

Art
 

Users who are viewing this thread

Back
Top Bottom