What You Need
- A database with a select property called βTime,β and each select will be formatted β#am/pm.β You also need a formula property to plug in the code.
!OR ... just duplicate this page
How To Use It
- After applying the formula, select a time from the select property and watch the formula generate a date and time for today @ time selected.
How does the formula work?
Condition 1: if tags say time (in 1 hour interval), do task at that time today
False Condition: if not, do task at 5pm
if(prop("Time") == "12am", dateSubtract(dateSubtract(now(), hour(dateSubtract(now(), 1, "days")), "hours"), minute(now()), "minutes"), if(contains(prop("Time"), "am"), dateSubtract(dateAdd(now(), toNumber(prop("Time")) - hour(now()), "hours"), minute(now()), "minutes"), if(contains(prop("Time"), "pm"), dateSubtract(dateAdd(now(), toNumber(prop("Time")) + 12 - hour(now()), "hours"), minute(now()), "minutes"), dateSubtract(dateAdd(now(), 17 - hour(now()), "hours"), minute(now()), "minutes"))))
Select + Timetable