cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

To convert time into numeric value

Former Member
0 Likes
212

Hello All,

I want to convert time into numeric value and reverse, example 1)  01:00:00 into 1.0 or 2) 01:30:00 into 1.5
Is any function or any method available to do the same.

Appreciate your help.

-Prasad

Accepted Solutions (1)

Accepted Solutions (1)

former_member185280
Active Contributor
0 Likes

You can try the datetoseconds and datefromseconds functions in the link editor and then divide or multiply. For your example the number of seconds in an hour, 3600, would work.

Expression Editor Functions

Regards,
Christian

Former Member
0 Likes

Hey Christian,

Thanks for your reply. I found another way to do that, if you have a time as 01:30 then separate 01 and 30 using string functions and divide that 30 by 60. So now we have two values 01 and 0.5, after adding these values we will get 1.5, which is a required output.

Regards,
Prasad

Answers (0)