Hello:
I was hoping someone can help me with a date calculation. I'm trying to calculate the number of days between a given date and the end of the month.
I have a form with three drop down boxes: month, day and year.
A user will submit a date using these drop down boxes. Based on their submission, I need to determine the number of days to the end of the month from the date which was submitted.
For example, if the person submits March 15, 2007 and the last day of the month of March is March 31, 2007. The number of days between the 15th and the last day of the month is 17.
How do I begin programming this calculation? Since the last day of the month differs from month to month (28th, 30th or 31st) I cannot figure out how to determine the last day of a given month.
Can someone help me out?
Thank you.