cancel
Showing results for 
Search instead for 
Did you mean: 

Date Validation

rebeccabowe
Level 2

Hi all,

Can anyone help with this problem - I have 1 Jun 2025 stored in the date item Start Date Text which is read into it via the Read action and when I compare it to the expression below it returns False. However, sometimes when I type the date out myself in the Evaluate Expression it returns True (this has happened twice out of the 15 times I have tried), so I am unsure of the problem

rebeccabowe_0-1749639089857.png

 

Thanks,

Rebecca

 

3 REPLIES 3

Hi, 

This expression does the following:

Today() gets the current date (e.g., 11 Jun 2025).
FormatDate(Today(), "yyyy/MM") converts it to a string like "2025/06".
ToDate(...) converts "2025/06" back to a date, which defaults to 1 Jun 2025.
FormatDate(..., "dd MMM yyyy") formats that date as "01 Jun 2025"

when you add 01 Jun 2025 to Start Date text data item this condition will match. So you have to alter the condition to 


FormatDate(ToDate([Start Date]), "dd MMM yyyy") = FormatDate(ToDate(FormatDate(Today(), "yyyy/MM")), "dd MMM yyyy")

Chakkravarthi_PR_0-1749639910322.png

 

Let know if that works.

 

Hi,

Thanks for the fast reply! I seem to be getting this internal error:

rebeccabowe_0-1749640494886.png

 

Thanks,

Rebecca

 

What's the "Start Date Text" - Data type. 

I have kept it as text and this works fine as below: 

Chakkravarthi_PR_1-1749640904899.png

If you have the Data type as "Date" change the condition to:

FormatDate([Start Date], "dd MMM yyyy") = FormatDate(ToDate(FormatDate(Today(), "yyyy/MM")), "dd MMM yyyy")

 

Chakkravarthi_PR_2-1749641679657.png