maclonghorn
Posts: 22
|
| Posted: 02/11/2010, 3:25 PM |
|
I have a date on my form (using the date picker, btw). The format is "mm/dd/yyyy", the dbformat is "yyyy-mm-dd" (MySQL). I have a custom insert/update (b/c the data source has a join). The custom parameter properties for the insert/update specifies the field as a Date type, and the parameter is a control. I keep getting 0000-00-00, which is what is in the database. I'm able to output the SQL before the update, and it's trying to use "02/11/2010" as the date, instead of the "2010-02-11" that I would expect b/c of the dbformat. What's the deal? Why isn't it using the dbformat?
|
 |
 |
maclonghorn
Posts: 22
|
| Posted: 02/12/2010, 10:43 AM |
|
OK, I figured this one out. The default code for update/insert was using $this->DateFormat which I finally found in the database connection settings, which had been set to "mm/dd/yyyy". I changed this to "yyyy-mm-dd HH:nn:ss" and all is well. I did have to manually edit the common.php file as well, since editing the database settings didn't automatically update this file.
Hope this helps someone else.
|
 |
 |
|