object-oriented time

John Ertle Jr 1 Reputation point
2022-03-12T21:38:46.373+00:00

I want to be able to show minutes, seconds and milliseconds in Now() and datetime.now thru object-oriented programming.

These do not work:

datetime.minute
now.minute
datetime.second
now.second

Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,720 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Viorel 114.7K Reputation points
    2022-03-13T05:51:42.577+00:00

    If VBA you frequently can use functions instead of objects: DatePart, FormatDateTime and Format. (For example: https://learn.microsoft.com/en-us/office/vba/Language/Reference/user-interface-help/datepart-function).

    To deal with milliseconds, see: https://social.msdn.microsoft.com/Forums/office/en-US/d876f50b-099c-4780-a66c-3ce1c28baa8b.

    0 comments No comments