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

 ccdateadd problem

Print topic Send  topic

Author Message
jpser

Posts: 44
Posted: 08/20/2007, 4:33 AM

php5:

$record->dini->setvalue(ccdateadd("2007-07-01",-1 year));
always returns error
but it gives : Parse error: syntax error, unexpected T_STRING

I tried with adding ccformatdate,ccparsdate
...setvalue(ccformatdate(ccdateadd("2007-07-01",-1 year),"shordate"))

the purpous is to return a date - 1 year
in php5

thanks for answer


_________________
jp serei
View profile  Send private message
Wkempees
Posted: 08/20/2007, 6:58 AM

  
$Component->SetValue(CCDateAdd($Container->date_added->GetValue(),'-1   
year') );  

CCDateAdd($date, value)
$date, needs to be a valid date as an array.
value is a string as in : '1 year'.

In the above code snippet (BeforeShow event of Textbox StartDate)
I assign to the current component ( $Component->SetValue() )
the value of another textbox on the same form date_added
( $Container->date_added->GetValue() )
additionaly I subtract one year from date_added.

CCDateAdd( $Container->date_added->GetValue(), '-1 year')



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.