Z time in cypher

I am doing something like this.. in a cypher script ..

merge (newPosition:Position{location:"friendsHouse",
Time:datetime(trim(rowFromLoadCMD.Time))})

Where time is in a zero-type time format like this
2021-06-18T16:04:06.72400000000016Z format.. so..
I need to have the Position’s attribute in the same format or when called upon, or return it into the same Z format.. Any ideas guys?

Question: do you want to merge on both the location and the Time, as a match will require both properties to be same. Do you really have the exact time to match on?

Your example is not a valid date. It has too many characters for the fraction of a second component.

I suggest you store the property as a date time type, so you can use the temporal functions and the time zone of the property is not important when comparing. You can even index the field for better range searching.

You could also convert the value to a specific time zone using the apoc library. Here is an example. I was not able to get the method to understand the "Z" shortcut (so I used +0000 offset instead), nor the fraction of a second to the nanoseconds.

with '2021-06-18T10:04:06.724+0000' as x
return apoc.temporal.toZonedTemporal(x, "yyyy-MM-dd'T'HH:mm:ss.SZ", "America/New_York")

Did you every create a custom procedure? If so, you can add a custom function to the plug-in for format your date format using the Java ZonedDateTime library.

Thanks MAN!.. Thanks Again.. Diggin through this now.. thanks man!
I have in the past created plugins.. so.. I like this idea.. thanks man