[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 Convert a date value to a numeric day of the week

     DOW(<dDate>) --> nDay


     <dDate> is a date value to convert.


     DOW() returns the day of the week as a number between zero and seven.
     The first day of the week is one (Sunday) and the last day is seven
     (Saturday).  If <dDate> is empty, DOW() returns zero.


     DOW() is a date conversion function that converts a date value to a
     number identifying the day of the week.  It is useful when you want date
     calculations on a weekly basis.  DOW() is similar to CDOW(), which
     returns the day of week as a character string instead of a number.


     .  These examples illustrate CDOW() and its relationship to

        ? DATE()                        // Result: 09/01/89
        ? DOW(DATE())                  // Result: 3
        ? CDOW(DATE())                  // Result: Tuesday
        ? DOW(DATE() - 2)               // Result: 1
        ? CDOW(DATE() - 2)            // Result: Sunday

     .  This is a user-defined function that uses DOW() to calculate
        the date of last Monday from any other date:

        FUNCTION LastMonday(dDate)
           RETURN (dDate - DOW(dDate) + 2)

 Files   Library is CLIPPER.LIB.

See Also: CDOW() DATE() DAY()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson