How do I calculate a date equal to 1st of the month following 30 days of employment but if the date of hire is on the 1st then xDate is 1st of the following month?
For example, DOH is 2/2/12 then xDate = 4/1/12. If DOH is 2/1/12 then xDate = 3/1/12.
Thanks for your help.
You need to convert your date string to a date object and then pull the date from that object so you can test if the hire date is the 1st or not. If it is the first then you will need to adjust the month value of the date object. You can then add the thirty days to the date object. You can now format the result of your calculation.