danthepcman
|
| Posted: 05/19/2003, 3:53 PM |
|
What am I doing wrong? I am using PHP with a MySQL database. Everything works great accept that my dates don't show on the grids or in the records. What's up? The data is being recorded in the database, as YYYY-MM-DD. I have formated the output to be Short Date (of course I have tried every option). Any help would be greatly appreciated. Thanks!
|
|
|
 |
RipCurl
|
| Posted: 05/19/2003, 6:40 PM |
|
Im not trully understanding what you're trying to do.
Short Date?(not a familiar description in php or MySQL)
Your Grid should be automatically set up to display anything and evertyhign and automatically know that the "date" field of your table is in MySQL Date Format (that field in your MySQL table is DATEFORMAT right?)
|
|
|
 |
danthepcman
|
| Posted: 05/20/2003, 12:18 PM |
|
Okay, what I have determined is that the ncar_maint.php file will take the input data and properly format it to the MySQL database format of yyyy-mmmm-dd and transmit the data to the database. I can read the data in the data record as 2003-05-19, but when I call that record from the grid, it does not display. If I put in some other data and Submit the record, then I lose the date data in the database. That tells me that it reads the whole record from the databse and then writes the whole record back. So it is not reading the date data out of the database. I have the date format in Project Settings at Short Date and the format in the object properties set to Short Date. What am I doing wrong?
|
|
|
 |
danthepcman
|
| Posted: 05/21/2003, 2:49 PM |
|
Okay, Okay, Okay... ...when using MySQL & PHP, the data in the MySQL database must be configured as datetime not date or timestamp. The MySQL database will accept the data correctly from CodeCharge, but CodeCharge can not read the data in any other format (why everybody isn't screaming this at me I can't figure out, I think that I'm still doing something wrong). I then had to set the Date Format in Project Settings to MM-DD-YYYY. Once I did that, everything worked. I also had to remove any formatting that I had put on any of the individual objects, just leavve them blank. Hope this helps the next guy! )
|
|
|
 |
|