----- Original Message ----- From: "Charles Kline" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, March 19, 2003 2:17 PM Subject: [PHP] date question
> Hi all, > > I have a form where users will be adding publication dates for uploaded > files. I want to store the date in mySQL as date('U') format. If the > date is entered as mm/dd/yyyy - will the date function know this or is > there some way of 'telling' php how the date to be converted is > formatted, if you all get what I am saying... > > Thanks > Charles Many people prefer to do their date conversions in the SQL query. But if you have to do it in PHP then you can use the strtotime() function to convert that date into a timestamp then store it in mySQL. You shouldn't have to do anything special with the string.. strtotime() will convert any standard recognized date format. http://www.php.net/manual/en/function.strtotime.php HTH, Kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php