CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 displaying date-fields

Print topic Send  topic

Author Message
materix
Posted: 09/24/2004, 6:19 AM

I have many date and datetime columns in a mysql-database.
Some columns have 0000-00-00 00:00:00 as a default value. I can verify when looking a the data directly in mysql that the value that is set is 0000-00-00 00:00:00.

But when these columns are displayed both in grids and forms generated with CCS then the value is displayed as 01-12-0000 00:00.

How can that be?
Karsten


Posts: 57
Posted: 09/24/2004, 7:26 AM

do the following:

open your project.

in menue click project->settings

in the project tab you can see a combobox labeled "Date Display Format"
there you can choose from various date display formats,.The Format you set here is used projectwide for every DATE type field.

this answers your question i think...

_________________
If one gives up, he told himself he failed.
View profile  Send private message
materix
Posted: 09/25/2004, 1:43 PM

Karsten, thx for your reply.

The problem is not the date format.

The problem is that blank dates (0000-00-00) are displayed as 0000-12-01.
Nicole

Posts: 586
Posted: 09/27/2004, 6:08 AM

Hello,
If you want to prevent empty days from displaying on a live page you can create Before Show event of a control in CCS and compare control’s value and "01-12-0000 00:00" as strings. If they are equal just assign empty string value to the control.

_________________
Regards,
Nicole
View profile  Send private message
materix
Posted: 09/27/2004, 7:36 AM

Hello, thx for your suggestion.

The before show event that you are suggesting is a possible "solution", but I do not think it is a very good solution, because it is very tedious to create this before show event for all pages where date fields are displayed.

As mentioned it seems that live pages created with CCS are displaying 00-00-0000 as 01-12-0000. This must be categorized as a bug in CCS.
peterr


Posts: 5971
Posted: 09/27/2004, 8:13 AM

materix,

The users on this forum cannot categorize something as a bug, therefore if you like to report any technical issues then please report them to the product support.
Secondly, I see many users here using PHP and not having such problems, therefore I believe that this is not a bug since then everyone would be reporting it, discussing it and trying to find a solution.
Looks like you might've misconfigured something. Again, you may contact the product support and they can help you with issues that you may not be able to resolve via forums.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Karsten


Posts: 57
Posted: 09/27/2004, 4:49 PM

hi materix,

hmmm i missunderstood at first but now i see what you mean.

i just can say, that i use NULL as datatype in mysql datetype fields if they have not a value (0 time) assigned to.this is also a good style because if there is NO TIME so there has to be NO time (null) (the mysql bible)

try it, it will throw away your dateproblems.

seers

Karsten from germany



_________________
If one gives up, he told himself he failed.
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.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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