Hi Andy, > I am trying to create a unix timestamp which dates back > a certain amount of days. Lets say I would like to have > a unix timestamp from 7 days ago. > what I tryed is just to subtract values since this are > counted s since the start of the unix epoche, but this > does not work in cases like the switch of months.
A quick and dirty way is to subtract 86400 from the current timestamp to push it back one day, so it would be (7*86400)=604800 for a week. This isn't the best method though - you should be able to do calculations within mktime(). If you post the code you tried we can have a look. Cheers Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php