EDIT2: Converting a Numeric, Date, or Date-Time Value to a Character String

How to:

The EDIT2 function converts a numeric, date, or date-time value to a character string based on a specified format. The format must be valid for the data supplied. The output is returned as variable length alphanumeric.

Syntax: How to Convert a Numeric, Date, or Date_Time Value to a Character String

EDIT2(in_value, 'format')

where:

in_value

Numeric, date, or date-time

Is any numeric value or a date in either standard date or date-time format. If the date is given in standard date format, all of its time components are assumed to be zero.

'format'

Is a numeric, date, or date-time format enclosed in single quotation marks.

Example: Converting a Date to a Character String

EDIT2 converts DATE1 (YYMD format) to a character string in YYMtrD format.

EDIT2(DATE1,'YYMtrD')

For 2012/02/02, the result is 2012, February 2.

WebFOCUS

Feedback