News:

  • May 05, 2026, 02:24:29 PM

Login with username, password and session length

Author Topic: Do-More Basics Time Members Question  (Read 6880 times)

Dean

  • Sr. Member
  • ****
  • Posts: 73
Do-More Basics Time Members Question
« 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.
10 Lather
20 Rinse
30 GOTO 10

plcnut

  • Hero Member
  • *****
  • Posts: 814
    • premiersi.com
Re: Do-More Basics Time Members Question
« Reply #1 on: October 28, 2015, 09:35:35 AM »
Go to DMD0221 in the help file. It explains each one. (Or just search "Date and Time Overview" in DMD help).
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
http://premiersi.com

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3806
    • Host Engineering
Re: Do-More Basics Time Members Question
« Reply #2 on: October 28, 2015, 10:00:07 AM »
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")

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6154
  • Yes Pinky, Do-more will control the world!
Re: Do-More Basics Time Members Question
« Reply #3 on: October 28, 2015, 10:12:40 AM »
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.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Dean

  • Sr. Member
  • ****
  • Posts: 73
Re: Do-More Basics Time Members Question
« Reply #4 on: October 28, 2015, 10:23:00 AM »
Many thanks guys. Lots to think about and study here.
10 Lather
20 Rinse
30 GOTO 10