day of year

day of year

Postby patili » 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
User avatar
patili
 
Posts: 98
Joined: Mon Jan 23, 2006 9:34 am
Location: LE CREUSOT FRANCE

Re: day of year

Postby wmormar » 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

Code: Select all  Expand view
DOY ([<dDate>])
William, Morales
Saludos

méxico.sureste
User avatar
wmormar
 
Posts: 1074
Joined: Fri Oct 07, 2005 10:41 pm
Location: México

Postby patili » Mon Jun 19, 2006 10:49 pm

No i'm using Fivewin and clipper
User avatar
patili
 
Posts: 98
Joined: Mon Jan 23, 2006 9:34 am
Location: LE CREUSOT FRANCE

Postby Antonio Linares » Mon Jun 19, 2006 11:19 pm

Patili,
Code: Select all  Expand view
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
User avatar
Antonio Linares
Site Admin
 
Posts: 41341
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby patili » Tue Jun 20, 2006 6:05 am

And NOW it exist
Thank you Antonio
User avatar
patili
 
Posts: 98
Joined: Mon Jan 23, 2006 9:34 am
Location: LE CREUSOT FRANCE

Postby Antonio Linares » Tue Jun 20, 2006 5:30 pm

You are welcome :)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41341
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for CA-Clipper

Who is online

Users browsing this forum: No registered users and 2 guests

cron