Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I have a csv file with time data in text format
here are 2 examples:
data: "03h 46mn 46mn 55s"
that I would like to convert in the script to "3:46:55" format
data: "32mn 20s"
that I would like to convert in the script to the format "0:32:20"
Can someone help me?
Thank you in advance
Piere
try like this:
=if(wildmatch(Replace(YourTimeField,' ',':'),'*h*')=1,Time(keepchar(Replace(YourTimeField,' ',':'),'0123456789:'),'h:mm:ss'),'0:'&keepchar(Replace(YourTimeField,' ',':'),'0123456789:'))
try this:
maketime(
if( isnull(SubField(data, 'h', 1)), 00, SubField(data, 'h', 1) ) , //hours
if( isnull(SubField(data, 'm', 1)), 00, right(SubField(data, 'm', 1), 2 ) ) ,//mins
if( isnull(SubField(data, 's', 1)), 00, right(SubField(data, 's', 1), 2 ) )
)
saludos!!!
try like this:
=if(wildmatch(Replace(YourTimeField,' ',':'),'*h*')=1,Time(keepchar(Replace(YourTimeField,' ',':'),'0123456789:'),'h:mm:ss'),'0:'&keepchar(Replace(YourTimeField,' ',':'),'0123456789:'))
Thank you very much, Frank, that's exactly what it is!
Thanks Marcos, it works for data 3h 45mn 12s but when there is no time (ex 22mn 12s) it brings me back an empty value