TIME (BETA) FIELD
The new Time field type was introduced as a part of Sprint 18′. The big difference with the well known “Date Time” type is that this new one allows storing times independently of the date.
Together with the new field type, there is also a corresponding return type that can be used in formulas. This means that you can now perform time specific calculations and set the validation rules based on these values.
The most common use cases would include things like:
- Booking – with check-in & check-out time
- Opening hours – for shops, offices, restaurants
- Event program – providing the schedule for different speakers
- Pilot: Summer ’17
- Closed Beta (sandbox and DE orgs): Winter ’18
- Open Beta: Spring ’18
- GA (forward-looking statement): Summer ’18
In Spring ’18 there was an update that changed the way Time interacts with numbers to allow more precision in calculations.
Previously, each integer in adding and subtracting formulas was counted for an HOUR, now it’s MILLISECONDS.
As a result, you might need to adjust your formulas to convert the values you added previously into Milliseconds
- Add 2 HOURS to the session start time
SessionEndTimeFirld=SessionStartsTimeField__c + 2
–> SessionStartsTimeField__c + 7200000
2. Calculate notification time to be 2 MINUTES before the SessionStart
NotificationTime = TimeField__c + 1/60*2
–> TimeField__c + 1200000
To discover more about time-based functions you can use in formulas –> have a look at the 9 new functions of SPrint 18′
You can also check other updates from the Spring 18′ HERE