SAP-archive / SAPConversationalAI

✨ 🤖 🤖 Build your own conversational bot on our Collaborative Bot Platform! 🤖🤖 ✨
https://cai.tools.sap
284 stars 68 forks source link

Compare 2 Dates in requirement #122

Closed Vinay0291 closed 5 years ago

Vinay0291 commented 5 years ago

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"

dbousque commented 5 years ago

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

Vinay0291 commented 5 years ago

Hi @dbousque,

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