Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
sarath_babu
Contributor II
Contributor II

Need to make time duration dafault to 01 when it is 00:00:00

Hi team,

i need to make the time duration as 00:00:01 when it is 00:00:00. Can you please help me, am attaching the sample data.

                                                                                             Duration
00:12:36
00:00:00
00:10:25
00:00:00
01:01:15
01:02:06
00:00:00
00:00:22
00:12:06
1 Solution

Accepted Solutions
marcus_sommer

You could try it with:

time(rangemax(Duration, maketime(0,0,1)), 'hh:mm:ss')

- Marcus

View solution in original post

4 Replies
marcus_sommer

You could try it with:

time(rangemax(Duration, maketime(0,0,1)), 'hh:mm:ss')

- Marcus

sarath_babu
Contributor II
Contributor II
Author

Thank you Marcus. Its working fine.

SergeyMak
Partner Ambassador
Partner Ambassador

Hi, How about to add IF statement into your script along those lines IF(Duration='00:00:00','00:00:01',Duration) AS Duration
Regards,
Sergey
Regards,
Sergey
sarath_babu
Contributor II
Contributor II
Author

Hi,

I have already applied  IF(Duration='00:00:00','00:00:01',Duration) expression, this is working but disturbing the other duration values.