Re: datetime

From: Date: Fri, 22 Aug 2003 02:26:30 +0000
Subject: Re: datetime
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-160375@lists.php.net to get a copy of this message
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" <dalehersh@hotmail.com> 08/22/2003 10:13 AM To: php-general@lists.php.net 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

« previous php.general (#160375) next »