Hello,
Welcome to our Microsoft Q&A platform!
Please try to this code: MyLabel.Text = DateTime.Now.TimeOfDay.ToString();
If you want to remove end of date, you can use
string str=DateTime.Now.TimeOfDay.ToString();
var s= str.Substring(0,str.Length-8);
=====================
Update=======================
Do you want to achieve it like this screenshot?(The displayed time is 11 hours later than the current one)
If so, you can achieve it like this code.
string str = DateTime.Now.AddHours(-11).TimeOfDay.ToString();
var s = str.Substring(0, str.Length - 8);
mylabel.Text = s;
Best Regards,
Leon Lu
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.