Máté Juhász Máté Juhász - 2 years ago 64
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?

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download