I was just wondering what the best way was to compare two dates and to check if the difference was greater than 3 months. Id like it to be pretty accurate not to the second but to the day would suffice.
I was thinking of just doing the following but it is a bit inaccurate, assuming there are 30 days each month that is.
(60 * 60 *24 *30 *3 = sec's in a 3 month period)
Code: Select all
If ($timestamp2- $timestamp1 > 7776000 ) {
// send new questionnaire
}Thanks.
James