I have a date/time field named Scheduled (orr_scheduled) and I am wanting to create a calculated column and have it populate the shift number (1-3).
They are 7-15, 15-23, 23-7. I cannot seem to find a function for obtaining the hour of the date/time field to then perform the calculation.
The ideas I can think of:
- Creating multiple calculated columns to identify the number of hours and/or minutes since a set date and divide by either 24 (hours) or 1440 (minutes) and take the remainder to identify the hour/minute.
- Use JS to populate the field on creation/modification.
One worry I have is the fact that there are timezones in play here. Any suggestions are welcome.