πŸ•₯

Auto Select β†’ Timetable

Master Tag
Tips & Tricks
Created
Jan 12, 2021 03:44 PM
How It Works
Usage
Web Tags
Formula
Database
Alternatives
Cover
Week Of Month (12).png

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
Name
Time
Convert To Date/Time
Person
Complete
8am
Complete
9am
Complete
2pm
Complete
4pm
Complete
5pm
Complete
8pm
Complete
11pm
Complete
12am
Complete