RE: [PHP-DB] Date comparison problem
| From: | USA) | Date: | Wed, 10 Jul 2002 14:36:48 +0000 |
| Subject: | RE: [PHP-DB] Date comparison problem | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-20456@lists.php.net to get a copy of this message | ||
This is how I do it:
date("m/d/Y",strtotime(odbc_result($rs,"ts")))
where $rs is the result set and "ts" is the name of the field containing the datetime.
<>< Ryan
-----Original Message-----
From: Gabor Niederlaender [mailto:gabor.niederlaender@wu-wien.ac.at]
Sent: Wednesday, July 10, 2002 8:21 AM
To: php-db@lists.php.net
Subject: [PHP-DB] Date comparison problem
Hi all!
I have got a "datetime" field in a MS-SQL DB, and I have a "date
field" in my html-form with the format: DD/MM/YYYY.
I would like to compare the two, but I think the two formats are a bit
different and they do not really want to be compared:)
If I write a query to write out the "datetime" field from the DB, I
get the form :
02 05 2002 12:25
In the HTML-form it looks a bit different: 12/10/2000
I do not really want to explode the form-data and than build a new
timestamp, it has to be a more simple way.
Thanks, best regards
Gabor
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php