Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
our DB stores the EDIT_TIME as a string like this 74533 for 07:45:33
How do I convert this to hh:mm
I have tried; Time(Time#(YN_EDIT_TIME, 'hhmmss'),'hh:mm') but its does not seem to work.
Hi
Try like this
Time(Time#(YN_EDIT_TIME, 'hmmss'),'hh:mm:ss')
it seems to work to me
Hi, Try this:
Time(Time#(If(Len(YN_EDIT_TIME)=5, '0' & YN_EDIT_TIME, YN_EDIT_TIME), 'hhmmss')) AS YN_EDIT_TIME
But it won't work if 11435 is for 11:04:35
Like Mayil said
Thanks
Yeah, 11435 = 01:45:35 and 111435 = 11:14:35
hi
try this
time(time#(fieldname,'hmmss'),'hh:mm')
or this
Date(Date#(fieldname,'hmmss'),'hh:mm')
OP requires hh:mm:ss to hh:mm, I think.
You should use
Time(Time#(YN_EDIT_TIME, 'hmmss'),'hh:mm:ss') //based on 74533
if your DB stores 07:04:05 as 745 then You should use hms instead of hmmss(its fine only if it stores it as 70405)
If minutes and seconds always have 2 digits, it will be fine !