Welcome to WebmasterWorld Guest from 54.144.68.27

Forum Moderators: ocean10000

Message Too Old, No Replies

Displaying Time

     

rcshield

12:17 am on Oct 27, 2009 (gmt 0)

5+ Year Member



Hello:
How do I display the current time (just a timestamp, not dynamic) on a Web page using ASP.NET (with seconds)?

Example: 5:00:52

g1smd

12:21 am on Oct 27, 2009 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Will it display the server time and time zone, or the users time and time zone?

Does it need date as well, or just time?

Will it be 24-hour or 12-hour am/pm time?

Ocean10000

2:02 pm on Oct 27, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



DateTime.Now.ToString("HH:mm:ss")

Reference:
DateTimeFormatInfo Class [msdn.microsoft.com]

 

Featured Threads

Hot Threads This Week

Hot Threads This Month