Date filter reference
Change the way dates are formatted in Current RMS using date filters.
Date conventions vary by country and region. We output dates in a format that's similar to ISO 8601 to avoid confusion between regions.
For example, January 2nd 2021 at 2:30pm would look like this:
The format we're using is:
This isn't especially friendly for your customers or colleagues, so you'll probably want to change the way that dates are displayed using a date filter.
Locale date
Use localedate
and localedatetime
to print the date or date and time as formatted for your region. Our default documents use the locale date filters.
Input
Output
Assuming the date is January 2nd 2021 at 2:30pm, where your user profile language is set to “English (United States)”:
Where your user profile language is set to “English (United Kingdom)”:
Build your own date
If you prefer, you can build your own date format. Use the filter date:
, followed by date blocks in quotation marks.
Input
Output
All the available date blocks that you may use are listed below.
'now'
'now'
To print the date and time at the moment a document is generated, use 'now'
. For example:
The date and time returned will be UTC, or Coordinated Universal Time. UTC is a standard time that computers use to store dates and times, avoiding confusion between timezones.
You may adjust the time that is output by adding an additional timezone filter. For example:
You can see a full list of timezones by editing your user profile. Use the list in the timezone drop-down.
Date
Presets
Parameter | Description | Output |
| Date as formatted for your region | |
| Date and time as formatted for your region | |
| Date in ISO 8601 format (yyyy-mm-dd) | 2021-01-02 |
Week
Parameter | Description | Output |
| Abbreviated weekday name | Sun |
| Full weekday name | Sunday |
| Day of the week, 0-6 with Sunday being 0 | 0 |
| Number of the week in the current year, starting with Sunday | 16 |
| Number of the week in the current year, starting with Monday | 15 |
Year
Parameter | Description | Output |
| Year without century | 21 |
| Year with century | 2021 |
Month
Parameter | Description | Output |
| Abbreviated month name | Jan |
| Full month name | January |
Day
Parameter | Description | Output |
| Day of month, zero padded | 01 |
| Day of month, not zero padded | 1 |
| Day of month, blank padded | 1 |
| Number of the day in the current year | 21 |
Time
Presets
Parameter | Description | Output |
| 24 hour time ( | 23:30 |
| 24 hour time ( | 23:30:00 |
| 12 hour time ( | 11:30:00 PM |
Hours
Parameter | Description | Output |
| 24 hour hour | 23 |
| 12 hour hour | 11 |
| Day of the week, 0-6 with Sunday being 0 | 0 |
| Meridian indicator (AM or PM) | PM |
Minutes and seconds
Parameter | Description | Output |
| Minute of the hour | 30 |
| Second of the minute | 20 |
Last updated