How to set tag value of date type? #220
Replies: 3 comments 14 replies
-
I want to say that's just an epoch value. So convert your date time to epoch and then write to tag. For figuring out if is a date/time value tag, I don't know if there's an attribute in the Tag class but you could check whether the value is epoch valid. i.e. if the value is up to date meaning within a month, you could check whether the epoch value is greater than N day. This could disqualify other udint values that aren't dates/times. Another way is to give proper tag names to datetime tags. |
Beta Was this translation helpful? Give feedback.
-
I'm unaware of a date/time tag type. There is display style of date/time for LINT types. Is this what you are referring to? |
Beta Was this translation helpful? Give feedback.
-
@TheFern2 |
Beta Was this translation helpful? Give feedback.
-
I've noticed that
Date/Time
tag type is returned byGetTagList
asUDINT
.Can I somehow detect that it's a tag with
Date/Time
type?How should i set a value of such a tag using
pylogix
?Beta Was this translation helpful? Give feedback.
All reactions