Skip to content

DateTimeFormat Function

Nilesh Ghodekar edited this page May 24, 2020 · 8 revisions

Syntax

string DateTimeFormat(date:datetime, format:string [, cultureName:string])

Description

Formats the value of the first DateTime parameter in the format specified in the second string parameter. If the optional cultureName parameter is not specified, the date is formatted in Invariant culture.

Remarks

If the second input parameter (format string) is null, an exception is thrown. If the first input parameter (date) is null, a null value is returned. If the third option input parameter (cultureName string) is not null and is not a valid culture name, an exception is thrown.

Supported Version

1.0.0.0 and later

Examples

DateTimeFormat(DateTimeNow(),"dd/MM/yyyy HH:mm:ss.ffff")

DateTimeFormat(DateTimeNow(),"dd/MM/yyyy HH:mm:ss.ffff", "es-ES")

or if you want just a date in a normal format: DateTimeFormat([//Target/EmployeeEndDate],"yyyy-MM-dd") - you can store it in //WorkflowData and later use it inside a notification template.

Clone this wiki locally