toChar

Returns the equivalent string given a date type expression and string format.

Example

toChar(SALES_BV.SourceColumns.TIME_ID,"MM-dd-yyyy")

This example converts timestamp values into strings with “MM-dd-yyyy” format.

Syntax

result = toChar(date expr d, string fmt)
  • d : date expression to convert
  • fmt : string describing format of output

    Returns

    string

Notes

toChar is used to resolve a date type into a format appropriate for the locale.

toChar supports the following formats:

  • mm-DD-yy
  • dd-MM-yy
  • day-of-week, day month year

© Incorta, Inc. All Rights Reserved.