having a bad brain day (having a cold sucks). can someone help me convert a UTC string to a readable date. i am wanting to drop this on my UDT tag so the conversion is done right at the UDT. here's the what i attempted so far:
hm. that's a problem... i admit, i didn't examine that as the docs said the device reported a UTC string... dammit. regardless, is the expression good? i can find out what the hell this incoming number is; i have control over ensuring that comes in as an actual UTC string (don't trust docs). given that incoming is correct, will the expression yield what i want?
EDIT: i should just go home, drink Buckley's, and die until tomorrow....
It doesn't seem to match any of the supported formats so I'm guessing it will yield an error unless you massage the string into a more standard format.
EDIT: Actually since it's a valid integer it'll try to treat it like a UTC timestamp and parse it that way so you'd get a bogus DateTime
Yeah, I was just going into detail on why the expression wouldn't work on that format as written. Just edited my earlier post to hopefully remove any ambiguity
so, yeah. the timestamp IS an actual UTC string... 979 years in the future. that's a little too much forward thinking...
the expression needs to be on the UDT. i know it works in a binding, but i want the UDT to return a readable date to the individual assets that source the UDT, thus the use of tag().
EDIT source device is sending wrong data. undocumented flag that generates the correct UTC string, btw. so that's where the jacked up string comes from...
buuut. it doesn't work. the tag() takes a string, yields a string. and toDate() takes a string, so this should be just fine... but it isn't. it spits out this error:
Error_ExpressionEval
not sure why the fails. when i try to put it on a binding, i get a different error:
Bad_NotFound
so now i'm confused. i just want a dang date on the UDT.