Live Chat Icon For mobile
Live Chat Icon

What is the best way to output only time and not Date

Platform: ASP.NET| Category: Basic

Use DateTime as follows
VB.NET


Response.Write(DateTime.Now.ToString('hh:mm:ss'))

C#


Response.Write(DateTime.Now.ToString('hh:mm:ss'));

Share with

Share on twitter
Share on facebook
Share on linkedin