Host Engineering Forum
General Category => Do-more CPUs and Do-more Designer Software => Topic started by: Dean on October 28, 2015, 09:00:53 AM
-
Spent some time this morning messing about with the various time members in a data view in an attempt to better understand them by looking at all of them in "native" format. Most are self explanatory, but a couple I didn't quite understand such as .Date, and .Time. If anyone has time, :) an explanation of what these numbers are would be appreciated.
-
Go to DMD0221 in the help file. It explains each one. (Or just search "Date and Time Overview" in DMD help).
-
The .Date and .Time "fields" are what we programmers like to call "Union" struct members of the individual fields.
As the Help topic explains, these are each a DWORD, which overlap the members of the words/bytes of the ACTUAL individual date/time fields.
The purpose? In case you needed to move just the TIME values or just the DATE values from this structure into another DWORD (or probably another TIME or DATE field in another Date/Time structure). Rather than having to do it in pieces parts, you can do it as just the .Date portion or just the .Time portion. It's definitely not a "critical" need, but for those who want to log just the Time or archive just the date, it provides a DWORD form of each of those (even Data View and Right-Click Format in online status Ladder parms supports this UNIONed form of a Date and Time, i.e. "Date Field" or "Date in Date/Time Struct")
-
And to expand on what Franj said, add the .Time and .Date members to a Data View, but change them to HEX format. It should be pretty obvious what they are.
-
Many thanks guys. Lots to think about and study here.