formatDate(prop("Date"), "Y")
formatDate
lets you display a date
property however you want. You can see a list of all the different displays below. The above will for example display the year of your date property
(2020, 2021).
In this example it's using the date property
named Date
to find the date to display.
formatDate(prop("Date"), "Do of MMM, dddd")
You can mix the different display formats together in one formatDate
formula.
For example this is using 3 different formats, and will display 8th of Jan, Friday for the date
Jan 8, 2021.
Below you'll see a table of how different formats display a date. All of these are using a date from Jan 8, 2021, with different minutes and seconds - because I used a date created property for the Date
.
The table has different views if you'd like to look at it with specific filters set.
formatDate(prop("Date"), prop("Format"))
This is the formula used for the table below - this displays the Date
(which is hidden in the All view) in the format that the property
Format
specifies.
formatDate
turns a date → text, so you can't use in to sort your calendar view or timeline views, and you can't filter by it using date filters like "within the past month" etc.formatDate