|
Posted by boclair on 08/08/06 01:35
Chris wrote:
> 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?
>
> Thanks,
> Chris
A simple method.
Split() given date into an array and list() the variables. Reorder date.
Perhaps convert to unix time with strtotime() before inserting into DB?
Louise
Navigation:
[Reply to this message]
|