Issues with doDateDeltaFromCurrent

book

Article ID: 102892

calendar_today

Updated On:

Products

CA Application Test Service Virtualization CA Continuous Application Insight (PathFinder) CA Service Virtualization (DevTest / LISA / VSE / Application Test)

Issue/Introduction

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
----

Cause

Magic date doDateDeltaFromCurrent is not well defined which causes the issue. For example:

doDateDeltaFromCurrent("yyyy-MM-dd'T'HH:mm:ss.SSSZ","-7D"); 
 

Environment

Supported DevTest Environments.

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