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

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.