Posted: 24 Jan 2017 21:08 EST Last activity: 22 Mar 2017 11:48 EDT
Date Format (YYYYMMDD) validation
I have a string property in which user enters a date in yyyymmdd format. I need to validate to check it's in valid YYYYMMDD format, in the activity. I do not see any OOTB functions to validate the date. Can you please give me a solution on how to validate the string to contain valid YYYYMMDD date value.
To add to Gisela's suggestion, You can validate the format at the property level using Edit-Validate rule. As a sample please check NotFutureDate: Expects a string in theValue in the format YYYYMMDD. This rule returns true if that date is today's date or a past date, or false if the date is a future date or not in the expected format.
I missed one point. Actually the user updates the data in excel in character format and we are using MSOParseExcelFile to populate the excel data to Clipboard. I need to perform date validation on the clipboard to make sure tha value that the user entered is in YYYYMMDD format.
Use the same logic mentioned in Datemmddyyyy (existing Validate rule name) and write your own java step/function to replicate the same logic for your date pattern. If the logic returns false, then set validation error message.