Formatting Time Field

SteveE

Registered User.
Local time
Today, 22:04
Joined
Dec 6, 2002
Messages
221
I have a time field that has to be exported as a specific format, but I cannot find a way to match the requirements, any help in achieving this would be appreciated. The Time is stored in a field [TTime] as hh:mm:ss but needs to be output as HHMMSS AM/PM ie “23:56:23”  “115623PM” the problem is that my customers system stores time in an unusual time format, where effectively the 24hr day is split up into two lots of “12,01,02,03,04,05,06,07,08,09,10,11 AM” and “12,01,02,03,04,05,06,07,08,09,10,11 PM”

from to outputted As
23:56:23 = 115623PM
00:00:01 = 120001AM
01:01:01 = 010101AM
12:20:33 = 122033PM
14:55:30 = 025530PM

I think a split and concatenation of the time field is required but I,m lost on the split of the day hours

Regards
Steve
 
Testet from immediate window:

?format(#23:26:23#,"hhmmssAM/PM")
112623PM

JR
 
Now you have made me feel a stupid !! works perfect many thanks
regards
Steve
 

Users who are viewing this thread

Back
Top Bottom