I have a form text field where a drop date for a mailing piece is entered. This field is followed by another field that needs to take the first date and subtract 48 hours (or two days) from it and automatically enter the value in it’s text field to give a date by which all materials for the mailing piece must be submitted.
[code]
How do I take that initial entered date’s value and subtract the two days from it and get it to give a valid date to put in the second text field. Especially, for example, if the first date is the first day of a month and moving backwards two days would put the materials date into the previous month? Or even more of a question if the date is say Jan 1st of a new year and the materials date would be the month before and in the previous year?
I imagine it would involve some equation applied to the posted value of the first date to calculate the new date’s value but how would you account for different months or years?
Adriana