Jump to content

+1 to Date Macros?


Recommended Posts

My goal is to take today's date and put it into an excel file (this I can do), and then go to the next row and add 1 to the date, doing this for 365 days. So starting today, I should have 06/14/2007 through 06/14/2007, one in each row.

The problem is the only way I can think to do this is to create a rule for every month because every month has a different number of days in it. So I would have to +1 to todays date, until the Day is =30, then I would have to +1 to the Month, and do that 12 times. Though it would work, it seems ridiculous, it seems that there would be a way to just +1 to today's date and loop that. (i.e. February would be +1 to the Day until Day=28, then +1 to the Month)

Sorry, my help file does not work, and I am sorry if this is in the help file already.

Thanks.

#include <ExcelCOM_UDF.au3>

For $iCC = 1 To 365
    _ExcelWriteCell($oExcel, @MON & "/" & @MDAY & "/" & @YEAR, $sRangeOrRow, $iColumn) ; Date
        $sRangeOrRow += 1
WEnd
Edited by litlmike
Link to comment
Share on other sites

He obviously knew.

@litlmike : You can find it in online beta-docs though : http://www.autoitscript.com/autoit3/files/...ns/_DateAdd.htm

I had no idea the beta helpfiles were online...

;(

But thanks for letting me know

http://www.autoitscript.com/autoit3/files/beta/autoit/docs/

Edited by litlmike
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...