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()


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.