FT Date-Time

 FT_ACCTADJ()     Adjust beginning or ending fiscal pd. dates to acctg. dates
 FT_ACCTMONTH()   Return accounting month data
 FT_ACCTQTR()     Return accounting quarter data
 FT_ACCTWEEK()    Return accounting week data
 FT_ACCTYEAR()    Return accounting year data
 FT_ADDWKDY()     Return true number of days to add given number of workdays
 FT_CALENDAR()    Display date/time calendar, find a date, return calendar data.
 FT_CIV2MIL()     Convert usual civilian format time to military time.
 FT_DATECNFG()    Set beginning of year/week for FT_ date functions
 FT_DAYOFYR()     Return calendar, fiscal or accounting day data
 FT_DAYTOBOW()    Calculate no. of days between date and beginning of week
 FT_DOY()         Find number of day within year
 FT_EASTER()      Return the date of Easter
 FT_ELAPMIN()     Return difference, in minutes, between two mil format times.
 FT_ELAPSED()     Return elapsed time between two days and/or times
 FT_ELTIME()      Compute difference between times in hours, minutes, seconds.
 FT_FDAY()        Return first day of the month
 FT_LDAY()        Return last day of the month
 FT_MADD()        Add or subtract months to/from a date
 FT_MIL2CIV()     Convert time in military format to civilian format.
 FT_MIL2MIN()     Convert time in military format to number of minute of day.
 FT_MIN2DHM()     Convert numeric minutes to days, hours and minutes.
 FT_MIN2MIL()     Convert minute of day to military format time.
 FT_MONTH()       Return Calendar or Fiscal Month Data
 FT_QTR()         Return Calendar or Fiscal Quarter Data.
 FT_SYS2MIL()     Convert system time to military time format.
 FT_WEEK()        Return calendar or fiscal week data
 FT_WORKDAYS()    Return number of work days between two dates
 FT_WOY()         Find number of week within year
 FT_YEAR()        Return calendar or fiscal year data

FT_DOY

FT_DOY()
 Find number of day within year

 Syntax

      FT_DOY( <dDate> ) -> <nResult>

 Arguments

     <dDate> is a date in the form "mm/dd/yy" or "mm/dd/yyyy"

 Returns

     Return numeric position of day within the year.
     Return NIL if parameter does not conform.

 Description

     Finds the day number, considering 01/01 as day 1
     Handles dates with CENTURY ON|OFF, to allow for 21st century.
     Date validation must be external to this function.

 Examples

     These code fragments find the day number, given a date.

     // literal character date
     dDate  := CTOD("01/01/91")
     nDayNum := FT_DOY(dDate)              // result:  1

     // presume DOS date to be 01/06/91
     nDayNum := FT_DOY(DATE())             // result:  6

     // date input
     cDate  := SPACE(8)
     @ 4,10 get cDate PICT "##/##/##"      // input 07/04/91
     READ
     nDayNum := FT_DOY(CTOD(cDate))        // result: 185

     // last day of year
     nDayNum := FT_DOY(CTOD("12/31/91"))    // result: 365

     For a demonstration of this function, compile and link the
     program WOY.PRG in the Nanforum Toolkit source code.

 Source: WOY.PRG

 Author: Forest Belt, Computer Diagnostic Services, Inc.