CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 date format

Print topic Send  topic

Author Message
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?
View profile  Send private message
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.
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.