serap
04-06-2004, 12:20 PM
I have a problem with the dates and how to format them - both when inserting and querying from DB.
Our users uses the dates in the "29-04-2004" (dd-mm-yyyy) format. The mySQL DB needs them in the "04-29-2004" (mm-dd-yyyy) (the US format).
Is there a function in mySQL/PHP that can convert directly? OR do I need to make a string manipulation? and what do I use to convert the string f.ex "29-04-2004" into "29" and to "04". I hava a PHP manual but could not really find anything that could 'cut' strings to pieces?
Thanks,
Serap
Our users uses the dates in the "29-04-2004" (dd-mm-yyyy) format. The mySQL DB needs them in the "04-29-2004" (mm-dd-yyyy) (the US format).
Is there a function in mySQL/PHP that can convert directly? OR do I need to make a string manipulation? and what do I use to convert the string f.ex "29-04-2004" into "29" and to "04". I hava a PHP manual but could not really find anything that could 'cut' strings to pieces?
Thanks,
Serap