Neo4j Temporal Query with NaT

neo4j

I am trying to do a temporal query similar to below:

MATCH (n:Event)
WHERE datetime(n.date) = datetime("2019-01-01")
RETURN n

But some NaT values have snuck into my n.date property. Is there any way to still do this query without having to update those nodes?

I can't remove the Date field from the nodes that have NaT as a value because the nature of the node the date is actually part of the node key.

TIA

Best Answer

My bad.. didn't think to exclude NaT from the query.

MATCH (n:Event)
WHERE n.date <> "NaT" AND datetime(n.date) = datetime("2019-01-01")
RETURN n