[PHP] looong date formatting for MySQL

2001-08-17 Thread CGI GUY
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: ?php $today = getdate(); $year = $today['year']; $month =

Re: [PHP] looong date formatting for MySQL

2001-08-17 Thread Adam Rambousek
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: [EMAIL

RE: [PHP] looong date formatting for MySQL

2001-08-17 Thread mike
PROTECTED] Subject: [PHP] looong date formatting for MySQL 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: ?php

RE: [PHP] looong date formatting for MySQL

2001-08-17 Thread Jerry Lake
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 There's gotta

Re: [PHP] looong date formatting for MySQL

2001-08-17 Thread CGI GUY
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-DD or

RE: [PHP] looong date formatting for MySQL

2001-08-17 Thread Jerry Lake
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) should do

Re[2]: [PHP] looong date formatting for MySQL

2001-08-17 Thread Adam Rambousek
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: 47596279

RE: [PHP] looong date formatting for MySQL

2001-08-17 Thread Maxim Maletsky
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 why I've added this: if ($month 10) { $month = 0; $month