Newer Version Available

This content describes an older version of this product. View Latest

date_to_string()

Converts a date to a string.

Syntax

date_to_string(date, formatString)

For the allowed formats, see the Date Formats section in Analytics External Data Format Reference.

This function is identical to toString().

Note

Usage

This function must take a toDate() or now(​) function as its first argument.

Example

1q = foreach q generate date_to_string(now(​), "yyyy-MM-dd HH:mm:ss") as ds1;