$FUNCNAME$
  DOW()
$CATEGORY$
  DATE/TIME
$SUMMARY$
   Convert a date value to a numeric day of the week
$LANG_RU$
          .
$SYNTAX$
     DOW(<dDate>) --> nDay
$LANG_RU$
     DOW(<>) -->  
$ARGUMENTS$
     <dDate> is a date value to convert.
$LANG_RU$
     <> -   ,  .
$RETURNS$
     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.
$LANG_RU$
     DOW()           
      .    -  ,  - .
      <>   , DOW()  .
$DESCRIPTION$
     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.
$LANG_RU$
     DOW() -    ,   
       ,   .   
         .  DOW()   
     CDOW(),         
     .
$EXAMPLES$
       These examples illustrate CDOW() and its relationship to
	DOW():

	? 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)
$LANG_RU$
           CDOW()  DOW():

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

           ,  
       DOW()        
       :

       FUNCTION LastMonday( dDate )
	  RETURN (dDate - DOW(dDate) + 2)
$SEEALSO$
  CDOW(),DATE(),DAY()
$END$
