Re: checking user input of MM-DD-YYYY

From: Date: Tue, 15 Jan 2008 19:38:01 +0000
Subject: Re: checking user input of MM-DD-YYYY
References: 1 2 3 4 5 6 7  Groups: php.general 
Request: Send a blank email to php-general+get-267329@lists.php.net to get a copy of this message
On Tue, January 15, 2008 12:31 pm, Adam Williams wrote: > Andrew Ballard wrote: > I don't see the point in needing to convert it to a timestamp. The > length_start and length_end fields in MySQL are defined as date > fields. > All I care about is the date, not the hours/minutes/seconds. If I > insert it as date('Y-m-d', $length_start) then when I SELECT it back > out, I will still have to do a date conversion back to MM-DD-YYYY when > I > display it to the user. No. MySQL is going to store it internally however it wants, regardless of how you get it in there. And you'll want to format it (or use MySQL default) independent of what you use to get it in there. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So?

« previous php.general (#267329) next »