SAP-archive/SAPConversationalAI

Compare 2 Dates in requirement

Vinay0291 opened this issue · 2 comments

Hi,

Is there a way through which we can compare 2 dates in 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"

Hi @Vinay0291, you can write something like if _memory.date2.iso greater-than _memory.date1.iso.

Hi @dbousque,

This does not help, I want to validate date in Validation section under Requirements of particular skill.