Quoting r937 <[EMAIL PROTECTED]>:

sorry, it's for inclusion into a db.. so I need to convert the date
before I create my MYSQL satement...

no you don't     ;o)

insert into mytable ( ... mydatecol, ... )
values ( ... , str_to_date('3/MAY/07','%e/%M/%y'), ... )

also, please be kind enough to trim your replies

awww, be kind to the guy, he's hung over...

/me throws a load of PHP at Tris - check this out:

--------------------------------------------
// input the date as a string
$textDate = "3/MAY/07";
// replace the "/" with " "
$initDate = str_replace("/"," ",$textDate);
// convert the new date string ("dd mm YYY") to a unix timestamp
$date = strtotime($initDate);
// convert the timestamp into the correct format
$correctformat = date("Y-m-d",$date);
// print the format out
echo $correctformat;
// add credit to Matt for giving you the code... ;)
-------------------------------------------

it works for me

Cheers,

Matt
--
Matthew Macdonald-Wallace
[EMAIL PROTECTED]
"Sed quis custodiet ipsos custodies?"




____ • The WDVL Discussion List from WDVL.COM • ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
use the web interface http://e-newsletters.internet.com/discussionlists.html/
      Send Your Posts To: [email protected]
To change subscription settings, add a password or view the web interface:
http://intm-dl.sparklist.com/read/?forum=wdvltalk

________________  http://www.wdvl.com  _______________________

You are currently subscribed to wdvltalk as: unknown lmsubst tag argument: ''
To unsubscribe send a blank email to [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016

Please include the email address which you have been contacted with.

Reply via email to