Help

Re: Change Decimal Time Format

925 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Erwin_Van_den_B
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi there,

I have already asked the same question here, only the question was wrong: I have to start from decimals. I don’t find any documentation on how to accomplish this anywhere. I am not an expert in this either.

So here’s the question:

I have records that contain time formats in decimals, eg: 0.50 (= 30 minutes), 8.00 (= 8 hours) etc. This is a formula field.

For a partner I have to convert this to the following format:

1.00 -> 0100
8.00 -> 0800
0.50 -> 0050
0.12 -> 0012
etc.

So 4 digits of which the first is a ‘0’. There should be no point in between.

Can anyone help me with this?

Thanks for your help!
Erwin

2 Replies 2
Nick_Dennis
7 - App Architect
7 - App Architect

The only way I know to always get 4 digits, starting with an unknown number of 0s, would be to turn the number into a string. Also note that this format limits the time measurement to 4 digits, so anything over 99.99 hours will not show up correctly.

Give this a try:
RIGHT(CONCATENATE("0000",ROUND({time} * 100, 0)), 4)

Replace {time} with your own starting variable.

Yes, that works. Thank you!