Máté Juhász Máté Juhász - 5 months ago 7
SQL Question

Strange behaviour of IsError

I have a column with dates formatted as text, missing values are marked with


I try to create an expression (SQL, not VBA) which converts that column to date, converting missing values to

  • This expression works as expected:


  • However if I try to make somethin more generic, looking for all non-date inputs I get
    for all non-date:


What I'm missing here?


I would try and use isDate() as an alternative:


Notice that I have swapped the true and false part around in the iif() as the expression has changed.

Although, if the only alternative to a date is the dash - symbol, which you have used in the first expression I believe that the IsNumeric() function would also work.