SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Date Format

  1. #1
    SitePoint Zealot
    Join Date
    Mar 2005
    Posts
    183
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Date Format

    Hi!

    How can I format a date to something like '18-Sep-2007' from '9/18/2007 12:00:00 AM' in C#.

    Pls Help.

    Thanks,
    Sid

  2. #2
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,653
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Check out the Date and Time formatting options on MSDN.

  3. #3
    SitePoint Guru Wullie's Avatar
    Join Date
    Oct 2002
    Location
    Greenock, Scotland
    Posts
    701
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    IN VB

    label.text = myDate.ToString("dd-MMM-yyyy")

    C# will be very similar i suspect
    ASP.NET Freelance Web Developer
    Bored? Check out my photography folio at Flickr


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •