PROTECTED]]
Sent: Saturday, August 18, 2001 8:30 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] looong date formatting for MySQL
Thanks for the reply, however, that function call
doesn't zero-substitute (i.e., "07" for "7", "03" for
"3", etc.); that's wh
look into the docs, there's possibility to display zeros (but I don't remeber
exact letter)
> Thanks for the reply, however, that function call
> doesn't zero-substitute (i.e., "07" for "7", "03" for
> "3", etc.); that's why I've added this:
--
Adam Rambousek
email: [EMAIL PROTECTED] ICQ:
date formatting for MySQL
NOW()
Jerry Lake
Interface Engineering Technician
-Original Message-
From: Adam Rambousek [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 17, 2001 4:20 PM
To: CGI GUY; [EMAIL PROTECTED]
Subject: Re: [PHP] looong date formatting for MySQL
date("Y-m-d&q
Thanks for the reply, however, that function call
doesn't zero-substitute (i.e., "07" for "7", "03" for
"3", etc.); that's why I've added this:
if ($month < 10) {
$month = "0";
$month .= $today['mon'];
}
By default, MySQL only accepts dates as -MM-DD;
PHP's getdate(Y-m-d) prints out -M-D
NOW()
Jerry Lake
Interface Engineering Technician
-Original Message-
From: Adam Rambousek [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 17, 2001 4:20 PM
To: CGI GUY; [EMAIL PROTECTED]
Subject: Re: [PHP] looong date formatting for MySQL
date("Y-m-d") should do the job
should do the job...
there is lot's of things that you can incorporate in the date
function... look it up at www.php.net/date
-Original Message-
From: CGI GUY [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 17, 2001 4:16 PM
To: [EMAIL PROTECTED]
Subject: [PHP] looong date forma
date("Y-m-d") should do the job
> There's gotta be an easier way to get create a date
> properly formatted for MySQL's standard -MM-DD
> DATE field format. Any suggestions,
> smacks-upside-the-head, etc. on how to reduce this
> would be greatly appreciated.
--
Adam Rambousek
email: [EMAI
There's gotta be an easier way to get create a date
properly formatted for MySQL's standard -MM-DD
DATE field format. Any suggestions,
smacks-upside-the-head, etc. on how to reduce this
would be greatly appreciated.
Here's my code:
It works, but sheesh...
8 matches
Mail list logo