FW: [PHP] Date() finding yesterday

2006-05-22 Thread Jef Sullivan
The easiest way I found to do this is using mktime(). If you don't care about the time for the date you can use this... $yesterday = mktime(0,0,0,date("m"),date("d")-1,date("Y")); This translates to yesterday morning after midnight. If you want the present time, only 24 hours before, use this...

FW: [PHP] date fiedl

2004-01-19 Thread Angelo Zanetti
I have a feeling that saving it as a numeric field would be quicker. Numeric fields are generally quicker than alphanumeric fields and the date field in mySQL has the format of -mm-dd, so it probably does some error checking/validation to see the format is correct and also it contains alphanu

Fw: [PHP] date functions

2002-09-23 Thread Kevin Stone
You should be working with UNIX timestamps here. Convert the dates to human readble only after you've done the calcuations. -Kevin - Original Message - From: "Patrick" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, September 23, 2002 2:38 PM Subject: [PHP] date functions >

Fw: [PHP] date

2002-05-02 Thread Richard Emery
When/If you read the PHP manual, you'll discover that the second parameter MUST be a timestamp; not a text string. - Original Message - From: Norman Zhang <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 02, 2002 2:17 PM Subject: [PHP] date Hi, I am doing a test with the