Date/Time Formatting
In-Season Produce
In-Season Produce
Food
In-Season?
Next Month?
January
February
March
April
May
June
July
August
September
October
November
December
Simple Timesheet
Week
Monday
Tuesday
Wednesday
Thursday
Friday
Total Hours + Minutes
Hourly Rate
guide
Part 1
Now Year
formatDate(now(), "Y")
Alternatives
- formatDate(now(), "YY")
Now
formatDate(now(), "L LT")
Alternatives
- formatDate(now(), "L") → 10/01/2020
- formatDate(now(), "LL") → October 1, 2020
- formatDate(now(), "LLL") → October 1, 2020 9:56 AM
- formatDate(now(), "LLLL") → Thursday, October 1, 2020 9:56 AM
- —
- formatDate(now(), "dddd, MMMM Do YYYY")
- formatDate(now(), "dddd [the] Do [of] MMMM")
Now Month
formatDate(now(), "MMMM")
Alternative
- month(now()) →
0
(Jan)-11
(Dec)
- formatDate(now(), "M") →
1
(Jan)-12
(Dec)
- formatDate(now(), "Mo") → 1st ... 12th
- formatDate(now(), "MM") → 01 → 12
- formatDate(now(), "MMM") → Jan ... Dec
- formatDate(now(), "MMMM") → January ... December
Go to produce
In-Season?
if(month(now()) == 0 and prop("January"), true, if(month(now()) == 1 and prop("February"), true, if(month(now()) == 2 and prop("March"), true, if(month(now()) == 3 and prop("April"), true, if(month(now()) == 4 and prop("May"), true, if(month(now()) == 5 and prop("June"), true, if(month(now()) == 6 and prop("July"), true, if(month(now()) == 7 and prop("August"), true, if(month(now()) == 8 and prop("September"), true, if(month(now()) == 9 and prop("October"), true, if(month(now()) == 10 and prop("November"), true, if(month(now()) == 11 and prop("December"), true, false))))))))))))
Next Month?
if(month(now()) == 0 and prop("February"), true, if(month(now()) == 1 and prop("March"), true, if(month(now()) == 2 and prop("April"), true, if(month(now()) == 3 and prop("May"), true, if(month(now()) == 4 and prop("June"), true, if(month(now()) == 5 and prop("July"), true, if(month(now()) == 6 and prop("August"), true, if(month(now()) == 7 and prop("September"), true, if(month(now()) == 8 and prop("October"), true, if(month(now()) == 9 and prop("November"), true, if(month(now()) == 10 and prop("December"), true, if(month(now()) == 11 and prop("January"), true, false))))))))))))
Now Date
formatDate(now(), "D")
Alternative
- formatDate(now(), "Do") → 1st ... 31st
- formatDate(now(), "DD") → 01 ... 31
Now Weekday
formatDate(now(), "dddd")
Alternative
- formatDate(now(), "d") →
0
(Sunday)-6
(Saturday)
- formatDate(now(), "dd") → Su ... Sa
- formatDate(now(), "ddd") → Sun ... Sat
Now Time
formatDate(now(), "LT")
Alternative
- formatDate(now(), "h:mm") → 1:53
- formatDate(now(), "h:mm a") → 1:53 pm
- formatDate(now(), "h:mm A") → 1:53 PM
- formatDate(now(), "H:mm a") → 13:53 pm (military time)
Find just hour
- hour(now()) → 18
- hour(now()) % 12 → 6
Quarter
formatDate(now(), "Qo")
Alternative
- formatDate(now(), "Q") → 1 .. 4
Timestamp
formatDate(now(), "X")
Alternative
- timestamp(now()) → long-form timestamp
- toNumber(now()) → Same as above
Part 2
2 Days Ago
formatDate(dateSubtract(now(), 2, "days"), "ll")
2 Weeks From Now
formatDate(dateAdd(now(), 2, "weeks"), "ll")
2 Months From Now
formatDate(dateAdd(now(), 2, "months"), "MMMM")
Arrival Estimate
formatDate(dateAdd(prop("Shipped"), 3, "days"), "ll [between 8am and 4pm]")
Morning?
(hour(prop("Shipped")) <= 11) ? "✔️✔️✔️✔️✔️" : ""
Part 3
Days + Hours
format(dateBetween(end(prop("Date Range")), start(prop("Date Range")), "days")) + "dy " + format(dateBetween(end(prop("Date Range")), start(prop("Date Range")), "hours") % 24) + "hr"
Hours + Minutes
format(dateBetween(end(prop("Date Range")), start(prop("Date Range")), "hours")) + "hr " + format(dateBetween(end(prop("Date Range")), start(prop("Date Range")), "minutes") % 60) + "m "
Days + Hours + Minutes
format(dateBetween(end(prop("Date Range")), start(prop("Date Range")), "days")) + "dy " + format(dateBetween(end(prop("Date Range")), start(prop("Date Range")), "hours") % 24) + "hr " + format(dateBetween(end(prop("Date Range")), start(prop("Date Range")), "minutes") % 60) + "m "
Go to timesheet
Timesheet
round(100 * (dateBetween(end(prop("Monday")), start(prop("Monday")), "minutes") + dateBetween(end(prop("Tuesday")), start(prop("Tuesday")), "minutes") + dateBetween(end(prop("Wednesday")), start(prop("Wednesday")), "minutes") + dateBetween(end(prop("Thursday")), start(prop("Thursday")), "minutes") + dateBetween(end(prop("Friday")), start(prop("Friday")), "minutes")) / 60 * prop("Hourly Rate")) / 100