Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
SK28
Creator
Creator

Convert this Time format to Timestamp

Hi

 

I have a JSON file as the data source.

The 

I have a column as shown below it's a Time 

Below is the format --> timezone<hh>H<mm>M<ss>S

Run_Time

PT00H00M00S

PT01H02M34S

PT02H03M23S

 

so on

 

Below is the format --> timezone<hh>H<mm>M<ss>S

let's take PT01H02M34S as example

Timezone - PT, H = hour, M = Minutes and S = Seconds

01 is the hours[hh]

02 is the Minutes[mm]

34 is the seconds [ss]

 

The requirement is to convert 

PT01H02M34S  into = 01:02:34 

 

Can anyone help me on this please,.

 

Appreciate your  efforts

 

1 Solution

Accepted Solutions
BrunPierre
Partner - Master
Partner - Master

Hi @SK28, try this.

Time(Time#(PurgeChar(Run_Time,'ABCDEFGHIJKLMNOPQRSTUVWYZ'),'hhmmss'),'hh:mm:ss')

View solution in original post

2 Replies
BrunPierre
Partner - Master
Partner - Master

Hi @SK28, try this.

Time(Time#(PurgeChar(Run_Time,'ABCDEFGHIJKLMNOPQRSTUVWYZ'),'hhmmss'),'hh:mm:ss')

SK28
Creator
Creator
Author

Thanks @BrunPierre  I wasn't Feeling well, Apologies for the late response!