FormatDate

Returns the local date and/or time formatted as specified.

Syntax

FormatDate(date, format, timeZone)

Enabled For

For a description of the business object categories, see Notes on "Enabled For".

Business Object Category Yes/No
Business Rules: Before-Save Rules Yes
Business Rules: Calculation Rules (After Save, with or without Also Recalculate on Load) Yes
Business Rules: Calculation Rules (Before Save or Always, without Also Recalculate On Load) Yes
Business Rules: Calculation Rules (Before Save or Always, with Recalculate On Load) Yes
Business Rules: Editing Rules Yes1
Business Rules: Initialization Rules Yes
Business Rules: Read Only Rules No
Business Rules: Required Rules Yes1
Business Rules: Validation Rules Yes1
Client Expressions No
Object Permissions No
Services Yes
LDAP Yes
Mobile Yes
Quick Actions (except Export to Microsoft Excel Quick Action and UI Quick Actions) Yes
UI Quick Actions No
Reports Yes
Search/Dashboard without field references Yes
Search/Dashboard with field references Yes
1. Except when this field appears on a form or is triggered by such a field.

Parameters

Parameter Description
date The date and/or time to format.
format

The format for the date and/or time.  See Standard date and time format strings for information about the accepted formats.

timeZone

(Optional) The time zone, in IANA format.

Return Value

String representation of date time value.

Example

$(FormatDate(ResolvedDateTime, "dd.MM.yyyy HH:mm"))

If the value of the ResolvedDateTime field is April 14, 2017 at 1:25pm, the above example returns 14.04.2017 13:25.