CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> Archive -> GotoCode Archive

 Format dates in grids with PHP "DD/MM/YYYY"?

Print topic Send  topic

Author Message
Posted: 01/02/2002, 10:25 PM

Anyone done this yet?

Not sure how to format the output of a date in a grid in whatever format I wish such as "DD/MM/YYYY" format.
Alex Alexapolsky
Posted: 01/03/2002, 2:10 AM

Try to use "BeforeShow" event in Form Properties/Events ,
where you can access your time field using fld prefix , for instance field name is date_entered :
$flddate_entered = date("y-d-M G:i",mktime($datetime["hour"],
$datetime["minute"], $datetime["second"], $datetime["month"],
$datetime["day"], $datetime["year"])) ;
- in Form/Properties define 'Open' event in the 'Event' tab.
sSQL = str_replace("my_table.my_field as ", "dataformatfunction(my_table.my_field) as ", sSQL);

This is an example for curent date , e.g. use $flddate_field_name = date($flddate_field_name,"l dS of F Y h:i:s A");


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit

Web Database

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

Home   |    Search   |    Members   |    Register   |    Login

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