fromdate(X;Y)

Formats a date in the form YYYYMMDD as a string according to a template. (Available as of version 15.19)

Syntax

fromdate(X;Y)

Input

Argument Type Description
X
  • integer
  • big integer
A scalar value or the name of a column containing date-related values
Valid values can be of the form:
  • date
Y text A "template" string specifying how the output should be formatted

The following is a partial list of string templates:

  • 'MM/DD/YY'
  • 'MM/DD/YYYY'
  • 'MM/YY'
  • 'MM/YYYY'
  • 'YYYY-MM-DD'
  • 'MonYY'
  • 'MonYYYY'
  • 'Mon-YYYY'
  • 'Month YYYY'
  • 'Qquot;Q"YY'
  • 'Q"Q"YYYY'

Return Value

Returns a string value of the date formatted using the template specified in the Y argument.

For more information about date formats, see Dates and time.

Example

The following example converts a date value in the form YYYYMMDD into a string value in the form 'MonYYYY':

<table cols="date_format">
20171031
20160203
20150102
20120315
</table>
<willbe name="date_text value="fromdate(date_format;'MonYYYY')"/>