PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
b4m
Forum Newbie
Posts: 2 Joined: Mon Apr 19, 2004 5:12 am
Post
by b4m » Mon Apr 19, 2004 5:12 am
I need to subtract a number of days from a specific day.
i.e from Mon 04/19/1996 i need to subtract 8 days
Can anyone please help me do so?
JayBird
Admin
Posts: 4524 Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:
Post
by JayBird » Mon Apr 19, 2004 5:31 am
Code: Select all
//Create a timestamp for 04/19/1996 using mktime and store in $date
//then simply do the following
echo date("d/m/Y", strtotime("-8 days", $date));
Mark
b4m
Forum Newbie
Posts: 2 Joined: Mon Apr 19, 2004 5:12 am
Post
by b4m » Tue Apr 20, 2004 4:03 am
Thanks for help