Condividi tramite


DOW( ) Function

Returns a numeric day-of-the-week value from a Date or DateTime expression.

DOW(dExpression | tExpression [, nFirstDayOfWeek])

Return Values

Numeric

Parameters

  • dExpression
    Specifies the Date expression from which DOW( ) returns the day number.
  • tExpression
    Specifies the DateTime expression from which DOW( ) returns the day number.
  • nFirstDayOfWeek
    Specifies the first day of the week. nFirstDayOfWeek may be one of the following values.
    nFirstDayOfWeek Description
    0 DOW( ) uses whatever day is currently selected in the Week Starts On list box, which appears on the Regional Tab in the Options dialog box.
    1 Sunday. This is the default when nFirstDayOfWeek is omitted, and is the first day of the week used in earlier FoxPro versions.
    2 Monday
    3 Tuesday
    4 Wednesday
    5 Thursday
    6 Friday
    7 Saturday

Example

STORE DATE( ) TO gdDayNum
CLEAR
? DOW(gdDayNum)
? CDOW(gdDayNum)

See Also

CDOW( ) | DAY( ) | SET FDOW | SET FWEEK | SYS( ) Functions Overview | WEEK( )