FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for CA-Clipper day of year
Posts: 98
Joined: Mon Jan 23, 2006 09:34 AM
day of year
Posted: Mon Jun 19, 2006 10:08 PM

Hi,
i am looking about a function which returns the numeric value of the day in the year
ex function (01/01/06) return 1
function (31/12/06) reutrn 365
May be this function exist but i don't find it
Any idea? Thanks

Posts: 1076
Joined: Fri Oct 07, 2005 10:41 PM
Re: day of year
Posted: Mon Jun 19, 2006 10:23 PM
patili wrote:Hi,
i am looking about a function which returns the numeric value of the day in the year
ex function (01/01/06) return 1
function (31/12/06) reutrn 365
May be this function exist but i don't find it
Any idea? Thanks


If use xHarbour

DOY ([<dDate>])
William, Morales

Saludos



méxico.sureste
Posts: 98
Joined: Mon Jan 23, 2006 09:34 AM
day of year
Posted: Mon Jun 19, 2006 10:49 PM

No i'm using Fivewin and clipper

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
day of year
Posted: Mon Jun 19, 2006 11:19 PM
Patili,
function Main()

   SET DATE FRENCH

   MsgInfo( Doy( CToD( "01/01/06" ) ) )

   MsgInfo( Doy( CToD( "31/12/06" ) ) )
   
return nil   

function DOY( dDate )

   local nMonth := Month( dDate )
   local nDay := 0
   
   while nMonth > 0 
      nDay += Day( dDate )
      dDate -= Day( dDate )
      nMonth--
   end
   
return nDay
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 98
Joined: Mon Jan 23, 2006 09:34 AM
day of year
Posted: Tue Jun 20, 2006 06:05 AM

And NOW it exist
Thank you Antonio

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
day of year
Posted: Tue Jun 20, 2006 05:30 PM

You are welcome :)

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion