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. date fomats

date fomats

Scheduled Pinned Locked Moved C#
5 Posts 5 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.
  • D Offline
    D Offline
    dandamudi padma
    wrote on last edited by
    #1

    hi i had date in he form of ddmmyy and it is dispalyed as 141107 but i want it to be in the form of 14-11-07 Regards padma padma

    C X B D 4 Replies Last reply
    0
    • D dandamudi padma

      hi i had date in he form of ddmmyy and it is dispalyed as 141107 but i want it to be in the form of 14-11-07 Regards padma padma

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      So change the display format. How are you rendering it now ? DateTime never renders like that, AFAIK.

      Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

      1 Reply Last reply
      0
      • D dandamudi padma

        hi i had date in he form of ddmmyy and it is dispalyed as 141107 but i want it to be in the form of 14-11-07 Regards padma padma

        X Offline
        X Offline
        Xmen Real
        wrote on last edited by
        #3

        are you using DateTimePicker? if yes then change it "Format" property to 'Custom' and in "CustomFormat" property enter your format like "dd-MM-yy" hope this will help

        Becoming Programmer...

        1 Reply Last reply
        0
        • D dandamudi padma

          hi i had date in he form of ddmmyy and it is dispalyed as 141107 but i want it to be in the form of 14-11-07 Regards padma padma

          B Offline
          B Offline
          Bino B
          wrote on last edited by
          #4

          U r fetching from db or selecting date from datepicker?

          Cheers Bino www.codepal.co.nr

          1 Reply Last reply
          0
          • D dandamudi padma

            hi i had date in he form of ddmmyy and it is dispalyed as 141107 but i want it to be in the form of 14-11-07 Regards padma padma

            D Offline
            D Offline
            DharmarajNagarajan
            wrote on last edited by
            #5

            Hi Padma, Just test using DateTime.Now.ToString("d"); there are formats avaibale just check by .ToString("m");("y") like that...

            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