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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

yesterdays_date("Y-m-d");

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I was wondering if php has a built in function that displays yesterdays date?
 
Try this:
Code:
$yesterday  = mktime (0,0,0,date("m"), date("d")-1, date("Y"));

This is an adaptation from some exaple code in the date() function documentation... i doubt its fool proof ;-)

good luck! -gerrygerry
Go To
 
don't doubt ... it works :) Anikin
Hugo Alexandre Dias
Web-Programmer
anikin_jedi@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top