Use date() and strtotime() together. strtotime will convert date string 
into integer timestamp. Still have any questions, check these two 
functions online plz.








"Dale Hersh" <[EMAIL PROTECTED]>
08/22/2003 10:13 AM
 
        To:     [EMAIL PROTECTED]
        cc: 
        Subject:        [PHP] datetime
 



I am using a mssql database and I have a question regarding the datetime
type. When I write a date to the database it store the date in the 
following
format:
6/8/03

But when I extract the date from the database it returns the value in the
following format:
Jun 8 2003 12:00AM

Is there a nice function available in php that will format the date based
upon certain specification. I know that date() exists, but I that means I
would have to use mktime() which would require parsing the entire string 
and
breaking the string into the day, the month, the year. Furthermore, I 
would
then need a switch statement to convert the value Jun into the value 6.

I appreciate any help.

Thanks,
Dale



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Reply via email to