Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need some help...
I have a script loading some data, DATE is one of the fields loaded. Those dates are not sequential, sometimes the difference between 2 dates could be 7 days, sometimes 2 days. I would like to create in this script 2 my own variables:
DATE1 - with the maximum date present in DATE variable
DATE2 - with 31-12-"present year" to the one represented by the maximum date from DATRE (in 100% cases present year to the max date from DATE would be present year to today())
Seams easy, but as I am not so familiar with date fuctions in a script, I just do not know how to handle
Thanks for any help
Hi draszor
Ok, I would create the variables in the qvw itself...
DATE1 = Max(DATE)
DATE2 then uses the variable DATE1 to ascertain the max year, then uses it as follows:
DATE2 = Date('31/12/'&Year(DATE1))-DATE1
I've attached a simple example to help you...
Derek
Hi draszor
Ok, I would create the variables in the qvw itself...
DATE1 = Max(DATE)
DATE2 then uses the variable DATE1 to ascertain the max year, then uses it as follows:
DATE2 = Date('31/12/'&Year(DATE1))-DATE1
I've attached a simple example to help you...
Derek
Hi,
Thanks a lot for this hint. I did not know that QV allows to create own variales in the report, and was thinking that all this stuff needs to be created in the script.
Because Date2 was appearing as 156 and not 31/12/2010, I corrected it into:
DATE2 = Date('31/12/'&Year(DATE1-360))
Thanks a lot once more
Robert