CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> Archive -> GotoCode Archive

 default date problem in passing to mysql

Print topic Send  topic

Author Message
Tatong Steele
Posted: 08/15/2002, 8:15 AM

Help.....

i'm having a problem in getting the current date to show the as default activation_date in a new record and passing this to mysql.

The newly created record shows the current date (date_activation) but,
The new database record always shows 1/1/0001 as the current date in the recordset (date_activation) .

On the "date_activation_BeforeShow()" I encoded this "$flddate_activation = date("YYYY-mmmm-dd");"

But all for nothing. Do you Guys have any idea whats should I do?

Thanks,
tatong steele
Nicole
Posted: 08/16/2002, 1:30 AM

Hello,
Please keep in mind for MySQL+PHP, that you should specify the following
"Date format" property in Connection/Server tab:
yyyy-mm-dd HH:nn:ss
This format is required because type of datefields is timestamp,
this info is required for timestamps to work properly.

Moreover on the forms you should select different DBFormat on the form for different type fields. Once form is created please check following settings on Data tab:
DataType: Date
Format (display format): select one you like
DBFormat: should match db date format. Select one from dropdown list or type it manually (in case there's no desired format in drop down ).
Note, that on record form you should enter dates in displaying format, then it will be converted to selected db format before inserting to db.
Boniface
Posted: 10/30/2002, 9:14 AM

Hi Nicole

So little yet so helpful. Had problem with inserting dates into the MYSQL database and read all over. But after reading your post it made such a huge diffrerence and a lot of sense. Thanks very much

One problem though. I can't get the grid to display the inserted dates. Anything I'm missing?


   


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.