Unproper time showing up with a formula

Hello,
I need to send to people the precise timing for their intervention. I have columns with proper beginning and end time, and I use a formula to caculate at which time a specific activity will start between those times. Here is the formula I use :
hour(dateAdd({Beginning time},30,“minutes”))&“:”&minute(dateAdd({End time},30,“minutes”))**

My problem is that the time showing up will be ok when I need to add 30 minutes to a straight hour (it gives me 9:30 for 30 minutes after 9:00 for example) but wrong when it is supposed to give me straight time (it gives me 9:0 instead of 9:00 for 30 minutes after 8:30 for example). How can I solve this so that it gives me straight hours properly?

Hi Aymeric,
You can replace the minute part of your formula with this one:
if((minute(dateAdd({End time},30,"minutes")))>=10,""&minute(dateAdd({End time},30,"minutes")),"0"&minute(dateAdd({End time},30,"minutes")))

To explain it briefly: if the calculates minutes are greater or equal to 10, you display it like that (I used ""&to force it being considered as a string), otherwise you write “0” before your calculated minutes.

Bests,
Benjamin

Thank you Benjamin, it worked beautifully :+1:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.