Report templatesFunctions

getFormattedDate

Format dates in DD.MM.YYYY format with dots as separators

Usage

The getFormattedDate function converts a date into a standardized DD.MM.YYYY format using dots as separators.

Syntax

{date | getFormattedDate}

Parameters

  • input (string/Date): A date string or Date object to format

Returns

A string in the format DD.MM.YYYY with:

  • Two-digit day (padded with zero if needed)
  • Two-digit month (padded with zero if needed)
  • Four-digit year
  • Dots as separators

Examples

Basic formatting

{"2024-01-15" | getFormattedDate}
// Returns: "15.01.2024"

Single digit days/months

{"2024-03-05" | getFormattedDate}
// Returns: "05.03.2024"

End of year

{"2024-12-31" | getFormattedDate}
// Returns: "31.12.2024"

With timestamp

{"2024-07-20T14:30:00Z" | getFormattedDate}
// Returns: "20.07.2024"

Project dates

{project.completion_date | getFormattedDate}
// Returns formatted completion date with dots

Report metadata

{report.generated_at | getFormattedDate}
// Returns: "15.01.2024" format

Use Cases

  • European-style date formatting
  • Standardized date display in reports
  • File naming with dates
  • Audit timestamps
  • Document versioning dates

Differences from formatDate

While formatDate offers multiple format options, getFormattedDate specifically provides:

  • Always returns DD.MM.YYYY format
  • Uses dots instead of slashes
  • No format parameter needed
  • Consistent European date style