homepage Welcome to WebmasterWorld Guest from 54.166.108.167
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
Forum Library, Charter, Moderators: ocean10000

Microsoft IIS Web Server and ASP.NET Forum

    
Displaying Time
rcshield




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

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




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

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




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

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

Reference:
DateTimeFormatInfo Class [msdn.microsoft.com]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved