To continue reading for free, register below or login
To read more you must become a member of Search400.com
');
// -->

Try this from Midrange.com.
*// Procedure: DayOfWeek //
*// Purpose: Determine the day of week for a particular date //
*// Parameters: //
*// I: dt -- date //
*// Returns: //
*// 0..6 -- 0=Sunday, 1=Monday, 2=Tuesday, etc. //
*// Notes: //
*// January 5, 1800 is a Sunday. This procedure only works for //
*// dates later than 1800-01-05. //
*////////////////////////////////////
P DayOfWeek b
D DayOfWeek pi 10i 0
D dt d value datfmt(*iso)
/free
return %rem (%diff (dt: d'1800-01-05': *days): 7);
/end-free
P DayOfWeek e
==================================
MORE INFORMATION ON THIS TOPIC
==================================
The Best Web Links: tips, tutorials and more.
Visit the ITKnowledge Exchange and get answers to your developing questions fast.
Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.
|