cancel
Showing results for 
Search instead for 
Did you mean: 

IsDate validation of Text time is returning wrong value

AvinashRamkumar
Level 4

Hi All,

Just tried checking a text value of time with IsDate function and it is throwing result as True.
The expectation is to have the value as False since it is a Time value.

The same result is observed for IsDate(), IsDateTime() and IsTime?

How could we fix this?

34940.png
Thanks
Avinash

1 BEST ANSWER

Best Answers

Hi @Avinash Ramkumar,

Since you have used a text datatype inside IsDate() function hence blue prism automatically appends date before the time and gives you the True result. You can first convert the text type to Time/DateTime/Date type and then use the function. It will give correct results.​

View answer in original post

2 REPLIES 2

SrinivasaTammin
Level 3
Hi Avinash,

As per the Microsoft documentation IsDate will return true if it is valid date or valid time or both. As a work around you can use code stage to validate date, Please find the code snippet for Date validation.

34939.png
This code will Match the date exactly in the format of "M/dd/yyyy", based on our need we can update the format like "dd/MM/yyyy" etc.

Hi @Avinash Ramkumar,

Since you have used a text datatype inside IsDate() function hence blue prism automatically appends date before the time and gives you the True result. You can first convert the text type to Time/DateTime/Date type and then use the function. It will give correct results.​