Issues with doDateDeltaFromCurrent

Document ID : KB000102892
Last Modified Date : 20/06/2018
Show Technical Document Details
Issue:
The magic date doDateDeltaFromCurrent is returning an invalid date or sometime throwing the below error:
-----
ERROR com.itko.lisa.test.ParseInState - Could not evaluate expression '=doDateDeltaFromCurrent
----
Environment:
Supported DevTest Environments.
Cause:
Magic date doDateDeltaFromCurrent is not well defined which causes the issue. For example:

doDateDeltaFromCurrent("yyyy-MM-dd'T'HH:mm:ss.SSSZ","-7D"); 
 
Resolution:
Using the correct format as below will resolve the issues.
{{=doDateDeltaFromCurrent("yyyy-MM-dd","10D");/*2014-10-08*/}}
Additional Information:
https://docops.ca.com/devtest-solutions/10-1/en/using/using-ca-service-virtualization/ca-service-virtualization-concepts/magic-strings-and-dates/magic-dates