G
Guest
I have a form where the user selects a month and year.
What I need is a second "date field" formatted as YYYY-MM-DD.
Here's the twist:
the date needs to be the end of the following month. (i.e. if the month 04
and year 2005 is selected , the date field needs to be 2005-05-31.
There are a couple of ways I started to work toward this goal. One was to
have [year]+"-"+([month]+1)+"-"+[something]. I'm not sure how to set up
something so that its the last day of the following month.
The other way would be to have it take [year]-[month+2]-1 and subtract one
day to get the last day of the following month. I'm not sure how to have the
program do this calculation though.
Thank you in advance,
What I need is a second "date field" formatted as YYYY-MM-DD.
Here's the twist:
the date needs to be the end of the following month. (i.e. if the month 04
and year 2005 is selected , the date field needs to be 2005-05-31.
There are a couple of ways I started to work toward this goal. One was to
have [year]+"-"+([month]+1)+"-"+[something]. I'm not sure how to set up
something so that its the last day of the following month.
The other way would be to have it take [year]-[month+2]-1 and subtract one
day to get the last day of the following month. I'm not sure how to have the
program do this calculation though.
Thank you in advance,