Question
1
Replies
128
Views
Posted: July 6, 2020
Last activity: July 9, 2020
Date Field Validation
Hi I have a requirement.
I have two date fields - Date 1 and Date 2.
I need to ensure Date 2 is always in the past of Date 1. How can I implement this requirement?
Thank you
Hi Samuel,
You can give a try on @CompareDates function. It accepts two DataTime strings as inputs and returns true if the first date argument is after the second.
If you are using a property of type Date, you can use this function by hard coding timestamp like below.
I created ConvertStringToDate function to convert string to Date with the following code. It accepts String and returns String.
Update the timezone based on the business and call the above function in a Validate rule or Activity based on your needs.
I hope it helps you. Let me know if you face any issues with the above.
Good Luck!