Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
in my excel file, I have data in the format hh: mm: ss that I want to transform in the format hh, m in the script when loading data.
today I can not transform my data into the desired format.
Thanks for your help
Typo should be 4,2 for mid, not 3,3. This also "assumes" the hour part of your string is always 2 digits.
Time(MakeTime(num(left(FieldName,2)), num(mid(FieldName,4,2))),'hh, m')
Rob's answer of interval does not have this restriction so I would go with that.
Or may be this
Table:
LOAD RowNo() as RowNum,
Time,
Num(Interval#(Time, 'h:mm:ss'))*24 as [Time in hour];
LOAD * INLINE [
Time
0:02:53
0:16:48
0:10:00
0:14:51
0:10:00
0:10:00
1:19:17
0:00:00
0:00:00
239:00:00
];
Thank you it works perfectly!
It was easy in fact..
Thank you it works perfectly!
It was easy in fact..