- About JET
- Administration
- Creating an App
- Basic Functions
- Advanced Functions
- Automation Parameters
- Field Value Selection
- Field Value Formatting
- Field Value Manipulation
- Total Count of a Form
- Total Sum of Field
- Minimum Value of Field
- Maximum Value of Field
- Average Value of Field
- Site Level Parameters - Site Name
- Site Level Parameters - Login User
- Site Level Parameters - Login User Email
- Owner Email
- Check Permission Group
- Date Time Addition
- Email Image
- CheckBox Condition
- Usage of Time Fields
- Parent Form Updates
- 3rd Party API
- Other Features
- Known Issues & Solutions
- Linux
- Windows
- FAQ (JET)
6.17.Usage of Time Fields
Usage of Time Fields
On this page, we show how we can make use of Time field in automations
We have a function toTime which will convert the field or time value to seconds.
Converting to seconds will not give a user-friendly value, so we need to minus off another time value to get a logical answer.
Dividing the final seconds value by 60s, 60mins, 24hrs will give corresponding values in time.
(toTime('{Out}')-toTime('09:00 AM'))/(60*60)
This calculates the time from 9am till the ending time which is represented by ‘{Out}’
It then returns the value in hours.
Note that this is usually used in the actions portion of automation.
(toTime('{Out}')-toTime('09:00 AM'))/(60*60*24)
This shows the same time as the previous one except that it returns the time in days.
((toTime('{Out}')-toTime('09:00 AM'))/(60*60))>8
This can also be used in the conditions portion of automation. In this case, it will only perform the automation if the calculated time is more than 8 hours.