RE: [PHP-WIN] Date conversion
| From: | Kit Kerbel | Date: | Thu, 25 Jul 2002 19:05:21 +0000 |
| Subject: | RE: [PHP-WIN] Date conversion | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-14945@lists.php.net to get a copy of this message | ||
I'm pulling the "2002-04-02 00:00:00" from a database(mssql). It reads 04/02/2002 in the database table, but when you pull the value out with php, it converts it to 2002-04-02 00:00:00. Then I am trying to compare it with 7/11/2002 to see if it is > or <. It's not comparing properly. Not sure what to do. Seems kinda like a stupid sticking point.
Kit
----Original Message Follows----
From: Dash McElroy <Dash@westonefcu.org>
To: 'Kit Kerbel' <kerbel5@hotmail.com>
Subject: RE: [PHP-WIN] Date conversion
Date: Thu, 25 Jul 2002 10:02:03 -0700
How is the string 2002-04-02 00:00:00 entered? Is that generated by a
database, a PHP function, or user input on a website?
The mktime(); function can probably help you, but take a look at it's funky
paramaters. When you're done with mktime();, pass it to date(); with the
paramaters you want (i.e. date(mdy, mktime(blah blah blah));
Good luck!
-Dash
-----Original Message-----
From: Kit Kerbel [mailto:kerbel5@hotmail.com]
Sent: Thursday, July 25, 2002 8:44 AM
To: php-windows@lists.php.net
Subject: [PHP-WIN] Date conversion
I would like to convert 2002-04-02 00:00:00 to the format,
04-02-2002....or m/d/Y
How would I do this?
Thanx in advance,
Kit
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com