$date1="2003-06-02"; $date2=date("Y-m-d",strtotime($date1)-3*24*60*60); echo $date2;
-- Best regards, George Nicolae IT Manager ___________________ PaginiWeb.com - Professional Web Design www.PaginiWeb.com "Jack" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Dear all > Here is the situation : > > Our automation system will generate a large number of pdf file to a specific > folder every day. The name format for all these pdf file is > "xxxx.20030602.pdf". > xxxx is the name of the file, > 20030602 is last working date. > > > what i want to do is: > 1. create a sub-folder inside this specific folder, and name it to current > month(Jun-2003) > 2. move the pdf which is not containning last working's file name to this > new create sub-folder. > 3. the files with last working date's name will stay on the specific folder. > > question : > > 1. I had used a date function with "w" parameter to check if current date i > execute the script is monday (1), if so , i tell the script to take the > current date minus 3, so the date will become last friday (as our last > working day), then i can base on this date to tell the script which files > should not be move to sub-folder! > > q: how i can do a date subtraction in php? (eg. "2003-06-02" - 3 = > "2003-05-30") > > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php