Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Last Week from Mktime

Status
Not open for further replies.

DaveyRichards

Programmer
Nov 8, 2006
14
GB
Hey all I am trying to get last week's date based on an Mktime value retrieved from a database.

How do I recompile the numbers to display last week's date in "26th February" format?

Thanks
 
a combination of strtotime and date should do it.

assuming you have the date in unix format

Code:
echo date("jS, F, Y", strtotime("-1 week", $inputdate));
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top