Jump to content
Sign in to follow this  


Recommended Posts



I was trying to count how many days until, for instance, the next tuesday.

I remembered JdeB had a collection of new date functions.

Available http://www.autoitscript.com/fileman/users/jdeb/test/datenew.au3.

So, I was checking all the functions to see if there was a function like that.

Took me a while...

And then I made one. I'm a little tired now;

Can you test the function I made to see if it works correct?

Share your thoughts here...

;----- This part is an example-----
$ToDay = 5
$NextDay = 3
$Diff = CountDiffDay($ToDay, $NextDay)
MsgBox(0, "Test", "Difference in days: " & $Diff)
;------------ End of example------

Func CountDiffDay($Day1, $Day2)
    If $Day1 = $Day2 Then
        $Count = 0
        If $Day2 > $Day1 Then
            $Count = $Day2 - $Day1
            $First = 7 - $Day1
            $Count = $First + $Day2
    Return $Count

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.