Integration Server 10.5 | Built-In Services Reference Guide | String Folder | Summary of Elements in this Folder | pub.string:isDate
 
pub.string:isDate
WmPublic. Determines whether a string follows a specified date pattern.
Input Parameters
inString
String Optional. String to be checked for adherence to the specified date pattern.
pattern
String Date format for specifying the inString parameter (for example, yyyyMMdd HH:mm:ss.SSS).
For more information about the pattern strings that can be specified for the date, see Pattern String Symbols.
Output Parameters
isDate
String Indicates whether or not inString follows the specified date pattern.
*true indicates that inString follows the specified date pattern.
*false indicates that inString does not follow the specified date pattern.
The service returns false if inString is not specified.
Usage Notes
The service returns an error if both inString and pattern are not specified.
You can specify any random string (for example, 111212) as both inString and pattern. The service returns true if the same user-defined string is specified as both inString and pattern. This is because the java.text.SimpleDateFormat class parses the user-defined input string and pattern to a valid date when the particular input values are identical.
You must ensure that the date you provide as inString has the same format as pattern. Because the java.text.SimpleDateFormat class allows you to specify any user-defined input string as a date format, the pub.string:isDate service might return true even if the inString format does not match the specified pattern.