VALID_DATE() function sees empty string as valid

book

Article ID: 87570

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

Error Message :
N/A

When using the VALID_DATE() command, the command would interpet blank values as a valid date.

Investigation

For an example of this behavior, from within a script object:

:set &var# = "" 
:set &ret# = valid_date(&var#) 
:print &ret# 

The following code should set &ret# to "N", because "" is not a valid date. However, &ret# is set to "Y".

 

Cause

Cause type:
Defect
Root Cause: An empty parameter results in a valid date.

Environment

Release: AUTWAB99000-11.0-Automic Workload Automation-Base Edition
Component:

Resolution

This field was added on 30/03/2017. This article has not been updated yet. Refer to the "Description" or "Workaround" sections for solution information.

Fix Status: Released

Fix Version(s):
Automation.Engine 12.0.1 - Available
Automation.Engine 11.2.4 - Available

Additional Information

Workaround :
You can define the expected date format instead and this works as designed: :set &var# = "" :set &ret# = valid_date("YYMMDD:&var#") :print &ret#