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

Posted on 2007-10-08
Last Modified: 2013-11-26
Development platform: 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.
Question by:amillyard
    LVL 16

    Accepted Solution

    DateTime.Now.ToString("ddd, MMM dd, yyyy");
    LVL 4

    Assisted Solution

    You can use the DateTime format string to accomplish this.

    Format Strings:

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

    If you need any help, let me know.

    Author Comment

    thank you -- both scripts supplied worked 1st time :-)

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
    Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    This video discusses moving either the default database or any database to a new volume.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now