KB-28681: Setting up a Message Box with Date/Time format.

Question:

When creating a Message Box with the date, a random numeric value is displayed (for example, 39876,8934523). How can I set up the Message Box with the Date/Time format?

Solution:

To do so, you can use the CDate() method to convert the number to the Date/Time format. For example:

Sample script being executed at a button’s Click event:

time = CDate(Application.GetObject(“Data.CurrentTime”).Value)
MsgBox time

Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Leave a Reply

Your email address will not be published.Required fields are marked *