Hoppa till huvudinnehållet

How to test for null/empty date?

Kommentarer

2 kommentarer

  • Patrick Fingler

    Hi Emily Renkema - A simpler method to check if a value is not null/empty is to use an if statement and set the condition to =!!$initialInspectionDate.value

    The True side will indicate that there is a value while the False side will indicate that there is a null value.

    I'm not entirely too sure what is contained within the $initialInspectionDate.value object, but it's possible that the "new Date()" method is actually never null and always returns the current date.  Also depending on your requirements, there's a "Format Date" activity that you might be able to use. 

    Hope that helps!

    2
  • Emily Renkema

    I think you're right about the new Date method. I've changed the code and it's returning as expected. I figured it was safe to assume I was missing something. :) Thanks!

    0

Du måste logga in om du vill lämna en kommentar.