Sign in to follow this  
Followers 0
myspacee

Day of year

4 posts in this topic

Hello,

need for a script to find in which day of year my PC is.

Today 12/12/2008 is 353th day of year.

need console output to redirect value to a batch,

anyone can help with logic (and maybe some code)?

thank you,

m.

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

wonderfull

here a version with user parameter :

#include <Date.au3>

Dim $Day1 = @YEAR & "/01/01"

If $CmdLine[0] = 0 Then

    $Days = _DateDiff("D", $Day1, _NowCalcDate() )
    ConsoleWrite($Days)
    
ElseIf $CmdLine[0] = 1 Then
    
    $Days = _DateDiff("D", $Day1, _NowCalcDate() ) + $CmdLine[1]
    
    if $Days > 365 then 
        $Days = $Days - 365
    endif
    ConsoleWrite($Days)
    
EndIf

if doy > 365 remove 365 and obtain doy of next year, but doesn't work

can anyone correct it ?

m.

Edited by myspacee

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0