Get the Hours and minutes of the system's current time

Dear all, is there any method to get the Hours and minutes, such as 17:12, of the system’s current time.

Hi @jackie.yue ,

DateTime.Now.Tostring(“HH:mm”)

Check this.

Hope it helps.

2 Likes

There is a warning like below:

Remove space between To and String. Its ToString.

Thanks, but also has a warning like this.

Your output variable is DateTime. Change it to String.

It worked. Thanks very much.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.