Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Need help.

Need help.

Scheduled Pinned Locked Moved C#
questionhelp
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mjawadkhatri
    wrote on last edited by
    #1

    Hi. i get system date in this format "mm/dd/yyyy" like "07/15/2009" now i want to change date format like this "15-JUL-2009" how can i do?? thanks in Advance jawad khatri

    S K S 3 Replies Last reply
    0
    • M mjawadkhatri

      Hi. i get system date in this format "mm/dd/yyyy" like "07/15/2009" now i want to change date format like this "15-JUL-2009" how can i do?? thanks in Advance jawad khatri

      S Offline
      S Offline
      SeMartens
      wrote on last edited by
      #2

      Hi, take a look at MSDN: http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx[^] Regards Sebastian

      It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

      1 Reply Last reply
      0
      • M mjawadkhatri

        Hi. i get system date in this format "mm/dd/yyyy" like "07/15/2009" now i want to change date format like this "15-JUL-2009" how can i do?? thanks in Advance jawad khatri

        K Offline
        K Offline
        K0306
        wrote on last edited by
        #3

        Try this

                DateTime dt = DateTime.Now;
                MessageBox.Show(dt.ToString("dd/MMM/yyyy"));
        

        Regards,
        Karthik K...

        M 1 Reply Last reply
        0
        • K K0306

          Try this

                  DateTime dt = DateTime.Now;
                  MessageBox.Show(dt.ToString("dd/MMM/yyyy"));
          

          Regards,
          Karthik K...

          M Offline
          M Offline
          mjawadkhatri
          wrote on last edited by
          #4

          thanks

          1 Reply Last reply
          0
          • M mjawadkhatri

            Hi. i get system date in this format "mm/dd/yyyy" like "07/15/2009" now i want to change date format like this "15-JUL-2009" how can i do?? thanks in Advance jawad khatri

            S Offline
            S Offline
            sarinsps
            wrote on last edited by
            #5

            see this use this namespace System.Globalization; DateTimeFormatInfo DTFI = new CultureInfo("hi-IN", false).DateTimeFormat; //here 'hi-EN' represent the Hindi-INDIA Indian culture here georgian //calender formate ie dd/MM/yy DTFI.DateSeparator = ":"; Label1.Text = DTFI.Calendar.ToString(); //we will ge the calender in formation Label1.Text = DTFI.FullDateTimePattern.ToString(); //give the Date/time/year formate of that culture Label1.Text = DTFI.LongDatePattern; Label1.Text = DTFI.ShortDatePattern;

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups