CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 error with strftime and mysql data type

Print topic Send  topic

Author Message
mindarch

Posts: 30
Posted: 02/18/2008, 3:07 AM

I am storing a date that is formatted as a php date data type. I am trying to use strftime to reformat it for display once I pull it from the db. I have done this before, but now I am getting an error saying that strftime has an error, parameter 2 (the string of numbers from the database that are the time/date) needs to be a long and it's a string. I've never seen that before. I tried changing it to an int, both as the actual mysql datatype and using intval and got 0 then. I tried changing the sql statement to use cast(date_time as long) and got a mysql error. Don't know what to do. I have other code that the same line works fine on.

Also, this works fine with a grid but not a report:

$services_services_schedul->Alt_scheduled_date_time->Text = strftime("%m/%d/%Y",$services_services_schedul->ds->f("scheduled_date_time"));
_________________
Mind Architecture
stephen@mindarch.com
View profile  Send private message
mamboBROWN


Posts: 1713
Posted: 02/20/2008, 9:25 PM

mindarch
How is the date stored in the database?? You could format it (date) in your resource query and display it as a string in your grid or report. What does your resource query look like??
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.

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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