How do you get the current time of day?

后端 未结 20 2620
长发绾君心
长发绾君心 2020-11-28 18:40

How do you get the current time (not date AND time)?

Example: 5:42:12 PM

20条回答
  •  旧时难觅i
    2020-11-28 19:43

    Get the current date and time, then just use the time portion of it. Look at the possibilities for formatting a date time string in the MSDN docs.

提交回复
热议问题