Date/Time Device Attribute: Formatting to Date

Hi,

I'm trying to accomplish extracting a device attribute and formatting it to a date. I'd like to compare this to another date in my piston. For some reason, it keeps formatting it to today's date. What am I missing?

Device Attributes:

image


Attempted Format - Uses Today's Date:


Format with Today's Date:

CC: @nh.schottfam

I'm assuming the attribute in the device is a string.

so you likely want to parseDateTime on the string into a date or datetime variable

then you should be able to use it as you want (the variable).

1 Like