How do you get the current time of day?

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

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

Example: 5:42:12 PM

20条回答
  •  清酒与你
    2020-11-28 19:37

    This will be better, Try This one

        DateTime.Now.ToShortTimeString();
    

    For this you don't need to specify the Format for the Time.

提交回复
热议问题