Date Format.

From: Date: Tue, 03 Jul 2001 15:20:24 +0000
Subject: Date Format.
Groups: php.db 
Request: Send a blank email to php-db+get-10042@lists.php.net to get a copy of this message
Hello all, I'm on the last leg of a project I'm doing, and maybe I'm just too fried but I've tried several things. Can anyone help: I've created an Event Listing form. The script pulls the table names from the DB and preg's them to create the field names for the form. Any field name that contains "Date" will be parsed as a Date. What's the best, most flexible way to go about parsing the user input into a Unix Timestamp? I've been using strtotime() and it seems to be off when the user types in 7-6-00 formatted dates. Is it possible to do without requiring the user use a specific format when entering dates? I'm also not stuck on using the Unix TS, but since I need to do a SELECT * I can't abstract any fields with SELECT DATE_FORMAT(). Anyone have any suggestions? Really the only problem here is that I can't select individual fields so I can't use MySQL date formatting without two queries. Thanks, John

« previous php.db (#10042) next »