Help

Time difference formula between two single-select fields

Topic Labels: Formulas
Solved
Jump to Solution
250 3
cancel
Showing results for 
Search instead for 
Did you mean: 
PeterJNCK
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello,
I am trying to make the process of time tracking more user-friendly. Instead of using the duration field and writing manually each time record, I would like to use two single select fields as StartTime and EndTime pickers, each containing values 00:00, 00:15, 00:30, 15:30, 15:45, 16:00, etc.

But I am stuck with a formula that makes a magic difference between these two times.
Is it even possible with a formula, or does it need to be done with some sort of script?

Thank you 

1 Solution

Accepted Solutions
preshetin
6 - Interface Innovator
6 - Interface Innovator

Hi Peter - this can be done with a formula. It may look like this:

 

 
 
DATETIME_DIFF(
DATETIME_PARSE({End Date} ,'HH:mm'),
DATETIME_PARSE({Start Date},'HH:mm'),
'minutes')
 

 

Here is how it works in action:

preshetin_0-1717492689006.png

 

See Solution in Thread

3 Replies 3
preshetin
6 - Interface Innovator
6 - Interface Innovator

Hi Peter - this can be done with a formula. It may look like this:

 

 
 
DATETIME_DIFF(
DATETIME_PARSE({End Date} ,'HH:mm'),
DATETIME_PARSE({Start Date},'HH:mm'),
'minutes')
 

 

Here is how it works in action:

preshetin_0-1717492689006.png

 

PeterJNCK
5 - Automation Enthusiast
5 - Automation Enthusiast

@preshetin Thank you!! Now it looks so simple 🙂

Happy it worked for you @PeterJNCK  - in case you have additional questions feel free to send me a DM