CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 [SOLVED] getvalue date and CCDLookup

Print topic Send  topic

Author Message
rla

Posts: 18
Posted: 08/22/2011, 10:48 PM

I am struggling trying to get a value which is a date and use it in a CCDLookup. The database is MYSQL, so it wants the format in yyyymmddnnss - date in the field itself is formated like

8/23/11, 01:20:09 AM

I have tried a few conversions ideas, but nothings working out. Anyone have tips on how to convert a getvalue or gettext to correct format?

FROM string 8/23/11, 01:20:09 AM
TO 20110823012009

Thanks
View profile  Send private message
jacem

Posts: 87
Posted: 08/23/2011, 7:13 PM

Hope these code snippets help you:

//displaying formated dates in label fields from cclookups
//the first array is stating how the date is coming in from the db and won’t change, the second array is the date format you want the date displayed in this time.
$Container->fieldtodisplaydate->SetValue(CCFormatDate(CCParseDate(
CCDLookUp("Createddae", "tablename", "ID='somecondition'",
$Page- >Connections["DatabaseConnectDB"]),array("yyyy","-","mm","-","dd",
" ","hh",":","nn",":","ss")),array("dd","-","mm","-","yyyy")));



View profile  Send private message
rla

Posts: 18
Posted: 08/24/2011, 9:01 PM

Thanks got me on the right track to get it done

CCFormatDate(CCParseDate($ActualFiles->UploadDate->gettext(),array("GeneralDate")), array("yyyy","mm","dd","HH","nn","ss"))
View profile  Send private message
mamboBROWN


Posts: 1713
Posted: 09/05/2011, 10:02 AM

rla,

If your answer has been solved please put [RESOLVED] or [SOLVED] in the thread header. Thanks...
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.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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