Hi. Help me please. Working with DateTime, how do I display the current time? time without date only hours, minutes | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Hi. Help me please. Working with DateTime, how do I display the current time? time without date only hours, minutes

29th Jul 2021, 2:18 PM
‎أندريه‎
‎أندريه‎ - avatar
4 Answers
+ 3
DateTime.Now.ToString("HH:mm")
29th Jul 2021, 2:30 PM
Abhay
Abhay - avatar
0
Thanks for your reply. Could you please tell me how to use the if statement for this?
29th Jul 2021, 3:53 PM
‎أندريه‎
‎أندريه‎ - avatar
0
if (DateTime.Now.Day == 30) ...
30th Jul 2021, 2:26 AM
NosZanou Officiel
NosZanou Officiel - avatar
0
What about time? without date
30th Jul 2021, 7:41 AM
‎أندريه‎
‎أندريه‎ - avatar