Oct 26, 2020 02:30 AM
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
Oct 26, 2020 04:06 AM
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.
Nov 03, 2020 03:19 AM
Yes, that works. Thank you!