How can I convert a string to a DateTime variable?

Hello,

I am trying to convert a timestamp (string) to a DateTime variable. This should be easy, but I'm not seeing it (probably some blind spot in me!). The short test code is:

Again, this is a simple test rule. The first line gets the string timestamp. The second adds milliseconds (I don't know if that is needed, but it was giving the same error before). The third line is my attempt to convert. When I run these actions, I receive the error:

and then can do nothing else with the rule but to delete it and start over (the error repeats every time I try to load the rule once I try running it).

What am I not seeing? Also, I'm fine with having the time in either a DateTime variable or as EPOCH time in an integer.

Thanks!

Suggest you look at this post [RELEASE] Date Time Parser driver (aka schedule_ur_garbage_cans) . The driver is great for converting date and time beyween various formats.

FYI I got it to convert this string “2026-08-27T15:39:00.000-0400” using set variable.

Set a Date-Time variable from DATE-STRING. Using %’s.

Any different string format got the same error.

It’s your +00:00. Should be +0000

Replace out that “:”.

Thank you! I knew it had to be something small I was overlooking (a colon is small!). It is

now working correctly!