FormatDate

Description

Formats dates according to a specified formatting pattern

Syntax

FormatDate(<input>, <formatting pattern>)

Arguments

Argument Type Description Optional
input DateTime DateTime to format No
formatting pattern Text (see definition below) Pattern that specifies how to format the input date value No

Formatting Pattern

The format parameter should contain either a single format specifier character (see Standard Date and Time Format Strings) or a custom format pattern (see Custom Date and Time Format Strings) that defines the format of the returned string. If format is an empty string, the general format specifier, ‘G’, is used.

Returns

Text

Examples

Expression: FORMATDATE("2013-1-1", "MM")
Returns: 1
Expression: FORMATDATE("2013-1-1", "MMMM")
Returns: January
Expression: FORMATDATE("2013-1-1", "D")
Returns: 01 January 2013
Expression: FORMATDATE("2013-1-1", "yyyyMMdd")
Returns: 20130101

Download

Download Example