CHAR

ANSI DB2 SQL/DS XDB
  X   X

The CHAR function can take a mask (XDB mode only) as an optional second parameter. The format appears below:

CHAR(date[,mask])

The parameter mask must be a quoted string that contains a mask for a date or a time, based on existing masking rules.

For example:

SELECT CHAR(datefld, "www") FROM datetable

will give the day of the week (for example, "MON"). For more information on masks, see the SQLWizard User's Guide and the Options User's Guide.