Created
September 9, 2022 15:17
-
-
Save solesensei/9105e73d856be8e7cd49bcd311e06d08 to your computer and use it in GitHub Desktop.
Notion Databases | Time since Update Time | years, months, hours
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
((dateBetween(now(), prop("Update Time"), "hours")) > 0) ? | |
( | |
( | |
(dateBetween(now(), prop("Update Time"), "hours")) < 24 | |
) ? ( | |
format((dateBetween(now(), prop("Update Time"), "hours"))) + ( | |
( | |
(dateBetween(now(), prop("Update Time"), "hours")) % 24 == 1 | |
) ? " hour": " hours") | |
): ( | |
( | |
(dateBetween(now(), prop("Update Time"), "days")) < 62 | |
) ? ( | |
format((dateBetween(now(), prop("Update Time"), "days"))) + ( | |
((dateBetween(now(), prop("Update Time"), "days")) == 1) ? " day": " days" | |
) | |
): ( | |
((dateBetween(now(), prop("Update Time"), "years")) == 0) ? ( | |
format((dateBetween(now(), prop("Update Time"), "months")) % 12) + ( | |
( | |
(dateBetween(now(), prop("Update Time"), "months")) % 12 == 0 | |
) ? "": ( | |
( | |
(dateBetween(now(), prop("Update Time"), "months")) % 12 == 1) ? " month": " months") | |
) | |
): ( | |
format((dateBetween(now(), prop("Update Time"), "years"))) + ( | |
((dateBetween(now(), prop("Update Time"), "years")) == 1) ? " year ": " years " | |
) + ( | |
( | |
(dateBetween(now(), prop("Update Time"), "months")) % 12 == 0 | |
) ? "": ( | |
format((dateBetween(now(), prop("Update Time"), "months")) % 12) + ( | |
((dateBetween(now(), prop("Update Time"), "months")) % 12 == 1) ? " month": " months") | |
) | |
) | |
) | |
) | |
) | |
): "less than an hour" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Normalize spaces with a browser url field, then copy-paste into a notion formula