8 Replies Latest reply: Nov 15, 2016 6:37 AM by gaurav gopale

# Convert field into HH:MM:SS

Hi

I have a field as follows:

Format(H.M.S)=0.0.1

Time

0.0.1

12.03.1

12.40.25

I want to convert it in HH:MM:SS as follows

Time

00:00:01

12:03:01

12:40:25

Can anyone help me in this

• ###### Re: Convert field into HH:MM:SS

Time(Time#(Time,'h.m.s'),'hh:mm:ss')

• ###### Re: Convert field into HH:MM:SS

Hi Antonio

it's not working

• ###### Re: Convert field into HH:MM:SS

Time(Time#('0.0.1','h.m.s'),'hh:mm:ss')  -> 00:00:01

Time(Time#('12.03.1','h.m.s'),'hh:mm:ss')  -> 12:03:01

Time(Time#('12.40.25','h.m.s'),'hh:mm:ss')  -> 12:40:25

• ###### Re: Convert field into HH:MM:SS
```LOAD *
,Time(Time#(Time, 'h.m.s')) as [New Time]
INLINE [
Time
0.0.1
12.03.1
12.40.25
];
```

Result:

Maybe you're doing any transformation before the data gets to format h.m.s?

• ###### Re: Convert field into HH:MM:SS

Yes

after doing some transformation i am getting that time field

That transformed field  have to convert it into HH:MM:SS, because i want to subtract that HH:MM.SS with other field

• ###### Re: Convert field into HH:MM:SS

In this case if you Resident load your transformed field Time into the formulas we suggest you'll get the correct answer.

• ###### Re: Convert field into HH:MM:SS

then too it is not working

• ###### Re: Convert field into HH:MM:SS

map1:

x, y

days,'.'

Hr,'.'

Min,'.'

Sec,'.'

] ;

Dim_tic_work_deta_desc:

work_deta_id_pk,

work_deta_origination,

work_deta_time_spend_on_previous_action,

SubField( mapsubstring('map1',work_deta_time_spend_on_previous_action),'.',2)&'.'&

SubField( mapsubstring('map1',work_deta_time_spend_on_previous_action),'.',3)&'.'&

SubField( mapsubstring('map1',work_deta_time_spend_on_previous_action),'.',4) as [w_d_t_spend_previous(HH.MM.SS)],

tic_work_upda_type_info_work_upda_type_id_fk

(qvd);

TT: