FT_DAYTOBOW

FT_DAYTOBOW()
 Calculate no. of days between date and beginning of week

 Syntax

      FT_DAYTOBOW( [ <dGivenDate> ] ) -> nDays

 Arguments

     <dGivenDate> is any valid date in any valid date format.
     Defaults to current date if not supplied.

 Returns

     A positive number of days to beginning of week, range 0 to 6.

 Description

     FT_DAYTOBOW() returns the number of days to the beginning of the
     week.  Normally this will be one less than the value that
     would be returned by the Clipper function DOW(), unless the
     day for the beginning of the week has been changed with
     FT_DATECNFG().

 Examples

     dDate := CTOD( "09/15/90" )

     ? DOW( dDate )               // 7
     ? CDOW( dDate )              // Saturday
     ? FT_DAYTOBOW( dDate )       // 6

     // change beginning of week to Friday  (yeah!)
     FT_DATECNFG( , 6 )
     ? DOW( dDate )               // 7
     ? CDOW( dDate )              // Saturday
     ? FT_DAYTOBOW( dDate )       // 1

 Source: DAYTOBOW.PRG

 Author: Jo W. French dba Practical Computing

See Also: FT_DATECNFG() FT_ACCTWEEK() FT_WEEK()

One response to “FT_DAYTOBOW

  1. Pingback: FT Date-Time | Viva Clipper !

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.