CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> Archive -> GotoCode Archive

 Displaying Dates MSSQL/PHP4

Print topic Send  topic

Author Message
koder
Posted: 12/01/2002, 7:01 PM

Using CCS 1.7, MSSQL 7 and PHP4.
I am finding it a problem displaying dates in "mm/dd/yy" format. The "Insert/Update" works. However, displaying the dates in "mm/dd/yy" just doesnt work.

I have researched "http://www.gotocode.com/art.asp?art_id=132&" and have read an article to use the "BeforeShow" event but am still unable to get it right.

I have set the display format to "mm/dd/yy" in the project settings. In my record I have set the "Data Type" to date, the "format" to "mm/dd/yy" and the "Dbformat" to MSSQL acceptable values. Tried various combinations but they still dont work. Any help would be appreciated.

Thanks
Karen
Posted: 12/02/2002, 8:38 PM

You will have to format the date in your sql statement.
koder
Posted: 12/02/2002, 10:25 PM

Karen:

I tried that i.e select convert ( varchar(12),c2, 1) as mydate, * from demo
This too doesnt work.

Guess, I have to dig into the code.

Thanks

Koder


RonB
Posted: 12/03/2002, 3:47 AM

in format use mm/dd/yyyy and in dbformat type mm-dd-yyyy ccs automaticlay add time after the date in dbformat remove that part!

that should do the trick

Ron
koder
Posted: 12/03/2002, 1:12 PM

RonB:

I tried your suggestion without any luck. I have tried SQL7 and SQL 2000 and the results are the same.

Koder



benoit
Posted: 12/03/2002, 11:47 PM

My feeling is that none of us understands clearly how dates are handled. A tech note about the way a date is changed from keyboard to database, and back to display, via codecharge code, and odbc driver, would be usefull.
Rao
Posted: 12/31/2002, 1:26 PM

This is a bug in CCS 1.0.7 / MSSQL / PHP. If you are getting a blank value, please change the field type to text in which case you will also get the time displayed along with the date. You can use substring to get the date portion only. This is what we are practicing for the time being to circumvent the problem. We hope this is corrected in the CCS 2.

Isaac
Posted: 02/04/2003, 10:05 PM

I'm having the same problem using MySQL. Are you saying to change the field type at the database to a text field rather than a date? Or are you saying to use text boxes on CCS to display the date field (it defaults to a Label in a grid, but making a text box there seemed to work. But the text box on the maint form doesn't work -- it remains blank.)


   


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.