Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide To Clipper - <b>dow()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
DOW()


Syntax:     DOW(<expD>)

Purpose:    To convert a date value to a number identifying the day of
            the week.

Argument:   <expD> is a date value to convert.

Returns:    An integer numeric value.

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

Usage:      DOW() is useful when you want date calculations on a weekly
            basis.

Library:    CLIPPER.LIB


----------------------------------- Examples -------------------------------

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

   The following user-defined function returns last Monday's date:

   FUNCTION LastMonday

   RETURN (DATE() - DOW(DATE()) + 2)


See Also: CDOW() DAY()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson