RE: [PHP] Difficulties with datetime
| From: | Anthony Martin | Date: | Tue, 05 Dec 2000 23:58:29 +0000 |
| Subject: | RE: [PHP] Difficulties with datetime | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-28789@lists.php.net to get a copy of this message | ||
You need to store this "open" status in another field. Unless you designate
a time to represent "open", like midnight or something, there's no room to
store it in the same field.
41 73 6B 20 79 6F 75 72 20 44 42 41 2E
Anthony
-----Original Message-----
From: Siim Einfeldt aka Itpunk [mailto:siim_e@pshg.edu.ee]
Sent: Tuesday, December 05, 2000 3:49 PM
To: Anthony Martin
Cc: php_uk@egroups.com; php-general@lists.php.net
Subject: RE: [PHP] Difficulties with datetime
> If the database accepts the state of NULL as the time and promotes it to
> midnight, there is no way to tell if the time was specified or if the time
> really was midnight.
not a good thing at all I must say:-)
> This is why we validate data entry. Garbage in (do a little datatype
> promotion), garbage out.
hard to do that as well, because user doesn`t have to write down
year,month,date,time...sometimes he can leave the time 'open' and so what
goes to database is....year-month-date 00:00:00. And there doesn`t seem to
be any way how I could make difference whether it`s 00:00 or 00:00....I
guess it`s impossible to write to the datetime column blahh-blaah-blaah
24:00:00?
S.