I have the following:
firstDate = InputBox("Insert the first report's date desired to obtain", "Report Information - Start", "YYYY-MM-DD")
So the user inserts the date, lets say: 2015-04-17
I am trying to find a way by which I can increase the date's value for a specific position (day->DD), for example:
dateIncrease = Mid(firstDate, 9, 2)+1
I am expecting the above to return 18 (17+1)
How can I increase the value of the date? Please help. Let me know if I wasn't clear enough. Thanks.
This is what you're looking for:
firstDate = "2015-04-17"
dateIncrease = DatePart("d", DateAdd("d", 1, DateValue(firstDate )))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With