Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
william_fu
Creator II
Creator II

Convert string into time?

How can convert a string into a timestamp (hh:mm)?

e.g.:

1531 into 15:31

0805 into 08:05

This code doesn't seem to work:

    Time(Time#([String], 'hh:mm') ) AS [StringHour],

After that, how would I combine it with a date to create a date/time column?

Thanks in advance

1 Solution

Accepted Solutions
pradosh_thakur
Master II
Master II

Time(Time#([String], 'hhmm') ,'hh:mm') AS [StringHour],

Learning never stops.

View solution in original post

3 Replies
pradosh_thakur
Master II
Master II

Time(Time#([String], 'hhmm') ,'hh:mm') AS [StringHour],

Learning never stops.
pradosh_thakur
Master II
Master II

for the second part something like this

timestamp(timestamp#(date_field & [StringHour],'DD/MM/YYYYhh:mm')) as date_time


here DD/MM/YYYY I have assumed as date format.

Learning never stops.
sunny_talwar

For second part, this is also possible

TimeStamp(DateField + Time(Time#([String], 'hhmm') ,'hh:mm')) as date_time_field