Jump to content
Sign in to follow this  
dreamzboy

Adding Days to Current Date

Recommended Posts

dreamzboy

I'm not very good with the leap year calculation so I'm reaching out for some assistance. Anyone know how to add days to current date and get a result in date?

Here's an example of what I wanted in my program:

Current Day = 02/06/2009 (mm/dd/yyyy)

Warranty Days Left = 20

Expiration Date = 02/26/2009 (mm/dd/yyyy)

I don't have my C programming book here so I can't look it up on how to solve leap year problem, but I remember it requires the mod operation (%). I've already look on this forum, but couldn't come up with an example. Maybe my keyword is buzzard. :)

To see what I mean in picture, see the link below. Sure, I can use what's already there, but I want to modify it so I can have more than one "Warranty Days Left" entry and I want it to output to a text file.

http://www.timeanddate.com/date/dateadd.html

Thanks in advance for any help. :)

Share this post


Link to post
Share on other sites
evilertoaster

Look at _DateAdd() and the other Date functions in the Date.au3 UDF.

Share this post


Link to post
Share on other sites
dreamzboy

:)

Thanks guy...Sorry I'm a noob. Didn't know there are so much helpfiles.

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  

×