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
day of year
Re: day of year
If use xHarbourpatili 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
Code: Select all
DOY ([<dDate>])
William, Morales
Saludos
méxico.sureste
Saludos
méxico.sureste
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Patili,
Code: Select all
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
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact: