DOWK and DOWKL: Finding the Day of the Week

How to:

The DOWK and DOWKL functions find the day of the week that corresponds to a date. DOWK returns the day as a three-letter abbreviation; DOWKL displays the full name of the day.


Top of page

x
Syntax: How to Find the Day of the Week
{DOWK|DOWKL}(indate, output_format)

where:

indate

I6YMD or I8YMD

Is the legacy date. If the date is not valid, the function returns spaces. If indate is specified in I6YMD format and DEFCENT and YRTHRESH values have not been set, the function assumes the 20th century.

output_format

DOWK: A4, DOWKL: A12



Example: Finding the Day of the Week

DOWK determines the day of the week that corresponds to the value in the HIRE_DATE field and stores the result in a column with the format A4.

DOWK(HIRE_DATE, 'A4')

For 80/06/02, the result is MON.

For 82/08/01, the result is SUN.


iWay Software