Hi, Sabrina,
an addition, if you do not want to change to the group by group structure.
There is an implemented function "checkdate" which really checks dates (including leap years) instead of just checking the format.
Unfortunately the syntax is
checkdate(month,day,year), meaning you have to split the entered value into these three parts. Well, easily done by some function (intval and substr).
As you know the structure of the date (e.g. "yyyy-mm-dd") you can say:
checkdate((intval(substr(Q1_SQ001,5,2)),intval(substr(Q1_SQ001,8,2)),intval(substr(Q1_SQ001,0,4)))
Remember: substr starts counting at "0".
Total validation:
((checkdate(intval(substr(Q01_SQ001, 5, 2)), intval(substr(Q01_SQ001, 8, 2)), intval(substr(Q01_SQ001, 0, 4)))) OR is_empty(Q01_SQ001))
And the tip could be:
{if((checkdate(intval(substr(Q01_SQ001,5,2)),intval(substr(Q01_SQ001,8,2)),intval(substr(Q01_SQ001,0,4))) OR is_empty(Q01_SQ001)) ,"Please enter a date","Please enter a valid date")}
By changing the substr-values you can adapt to other date formats.
Result:
Best regards
Joffm