| 
	
 | 
 Posted by Matt on 08/08/06 00:23 
"Chris" <designerNOSPAM@centurytel.net> wrote in message  
news:eb8c47$lto$1@news01.intel.com... 
>I am also having an issue with dates - I have a js calendar pop-up for  
>selecting the date to insert into a text box.  It is formatted to show the  
>date as mm/dd/yyyy.  However, the dates in the mySQL db show as yyyy-mm-dd,  
>and I have noted that when I try to input a new date into the database via  
>the form, all the db shows is 0000-00-00.  Do I need to format the date  
>some way that it will go into the db the same way the db displays?  Can I  
>change to format of the date field in the db?  I researched this, but only  
>came up with ways to change the display in the Select results (works great  
>for printing out the date).  Do I need to forget the calendar pop-up and  
>just have users input the date using an example format? 
> 
 
Hi Chris, 
 
I haven't had any experience with this, though strangely enough a friend is  
working on just what you are asking about, he leaves the date formatted as  
yyyy-mm-dd, and only does the 'user-friendly' formatting when displaying the  
results. The form in which he uses the calendar is only used by himself for  
admin so he can cope with it. Thinking on though, one workaround maybe to  
put the 'ugly' date in a 'hidden' form field and have the 'user-friendly'  
date populate a field that isn't actually used in updating/appending to the  
database. 
 
As I say just a thought, though I'm sure there's a nicer solution out there. 
 
Regards 
Matt
 
  
Navigation:
[Reply to this message] 
 |