Can anyone tell me how to convert a date stored in the format "YYYY-MM-DD" to an integer of seconds since unix epoc,

then add $daysToAdd days to this value (I suppose if the integer was a number of seconds it would have to be $daysToAdd*60*60*24 to get the number of seconds to add)

then convert the new value to a timestamp which I can output using the function

string date ( string format [, int timestamp])

I tried doing this with mktime() and couple different ways using strtotime() and also with strftime() but I kept getting -1 as the result for strtotime() indicating the function couldn't interpret the given date.

I've been through all the date-related functions in the manual I can think of, but I'm stumpped on this one...

Reply via email to