Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 201
  • Last Modified:

display the current date in the following format: Mon, Oct 08, 2007

Development platform: asp.net 2.x, MS Visual Studio Pro utilsing Web Developer, c#, sql 2005, iis 6 & win server 2003

Wanting to display the current date in the following format:  Mon, Oct 08, 2007

Sample code (c#) would be much apprieated.

Thank you in advance for your time and efforts with this enquiry.
0
amillyard
Asked:
amillyard
2 Solutions
 
McExpCommented:
DateTime.Now.ToString("ddd, MMM dd, yyyy");
0
 
jimstarCommented:
You can use the DateTime format string to accomplish this.

Info: http://msdn2.microsoft.com/en-us/library/01cf75zk.aspx
Format Strings: http://msdn2.microsoft.com/en-us/library/97x6twsz.aspx

DateTime d = System.DateTime.Now;
string mydate = d.ToString("ddd, MMM dd, yyyy");

If you need any help, let me know.
0
 
amillyardAuthor Commented:
thank you -- both scripts supplied worked 1st time :-)
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Tackle projects and never again get stuck behind a technical roadblock.
Join Now