php3 MySQL------ is it necessary to convert all dates if I want to calculate ?
| From: | Joachim Ritzer | Date: | Tue, 17 Oct 2000 16:40:07 +0000 |
| Subject: | php3 MySQL------ is it necessary to convert all dates if I want to calculate ? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-20666@lists.php.net to get a copy of this message | ||
hello everybody,
maybe someone had the same problem before.
Is it necessary to convert all dates first from dd/mm/yy to yy/mm/dd and
again in MySQL from yy-mm-dd to a number (see example below), if i want to
calculate?
mysql> select TO_DAYS(9505); -> 733364
mysql> select TO_DAYS('1997-10-07); -> 729669
What I´m looking for is a function, that selects the arrival-date and
departure-date from a database and calculates automatically the days
between.
Thanks for your help in advance and have a nice week,
best regards joachim.