RWayneH
asked on
Set variable to Today + 180 days
How would I rewrite this so strDate results in Today + 180 days and in the formet yyyy-mm-dd ?
not sure what the g_sDate is? Please advise and thanks.
strDate = Format(g_sDate, "yyyy-mm-dd")
not sure what the g_sDate is? Please advise and thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
strDate = Format(DateAdd("d", 180, g_sDate), "yyyy-mm-dd")
ASKER
Ok. I see it in a few places in the code. My attempts at getting strDate defined to Today + 180.
strDate = Format(Date + 180, "yyyy-mm-dd")
??
ASKER
It worked!!! I was totally guessing.
ASKER
thanks for the help.
You’re welcome and I’m glad I was able to help.
If you expand the “Full Biography” section of my profile you’ll find links to some articles I’ve written that may interest you.
Marty - Microsoft MVP 2009 to 2017
Experts Exchange Most Valuable Expert (MVE) 2015, 2017
Experts Exchange Top Expert Visual Basic Classic 2012 to 2017
If you expand the “Full Biography” section of my profile you’ll find links to some articles I’ve written that may interest you.
Marty - Microsoft MVP 2009 to 2017
Experts Exchange Most Valuable Expert (MVE) 2015, 2017
Experts Exchange Top Expert Visual Basic Classic 2012 to 2017