SAP-archive/SAPConversationalAI

Compare 2 Dates in validation under requirement

Vinay0291 opened this issue · 1 comments

Hi,

Is there a way through which we can compare 2 dates in Validation under the Requirement section of skill ?
Date stored in memory is of type string due to which compare operators stands invalid.

For example: Date1 : 2018-12-19
Date2 : 2018-12-18

I want to check if Date2 > Date1

In memory it is stored as - Date1 - formatted: "Wednesday, 19 December 2018 at 05:30:00 AM",
iso: "2018-12-19T05:30:00Z"
Date2 - formatted: "Tuesday, 18 December 2018 at 05:30:00 AM",
iso: "2018-12-18T05:30:00Z"

PS: I had created same issue in the morning got a reply but that did not help.

Previously Opened Issue - #122

Hi @Vinay0291, you can compare dates using the greater-than and lower-than operators :) : if date1.iso greater-than date2.iso