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
  1. Home
  2. General Programming
  3. C#
  4. How to convert string

How to convert string

Scheduled Pinned Locked Moved C#
helptutorial
5 Posts 3 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.
  • P Offline
    P Offline
    papa80
    wrote on last edited by
    #1

    Hi I have a string in format "21.05.2004" pleas tell me how to convert it to DataTime format.All time i get InvalidDataException.Pleas help me if you can.

    when i want to read something good just seat and type it

    N 1 Reply Last reply
    0
    • P papa80

      Hi I have a string in format "21.05.2004" pleas tell me how to convert it to DataTime format.All time i get InvalidDataException.Pleas help me if you can.

      when i want to read something good just seat and type it

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      DateTime.Parse ??? Make sure the culture is set correctly for you date format also.


      only two letters away from being an asset

      P 1 Reply Last reply
      0
      • N Not Active

        DateTime.Parse ??? Make sure the culture is set correctly for you date format also.


        only two letters away from being an asset

        P Offline
        P Offline
        papa80
        wrote on last edited by
        #3

        How to change the culture ???

        when i want to read something good just seat and type it

        K 1 Reply Last reply
        0
        • P papa80

          How to change the culture ???

          when i want to read something good just seat and type it

          K Offline
          K Offline
          KevinMac
          wrote on last edited by
          #4

          System.Globalization.CultureInfo culture = new System.Globaliztion.CultureInfo("ru-RU"); // Russian DateTime dt = ConvertTo.DateTime("21.05.2004",culture); msdn site

          P 1 Reply Last reply
          0
          • K KevinMac

            System.Globalization.CultureInfo culture = new System.Globaliztion.CultureInfo("ru-RU"); // Russian DateTime dt = ConvertTo.DateTime("21.05.2004",culture); msdn site

            P Offline
            P Offline
            papa80
            wrote on last edited by
            #5

            Supper thank's

            when i want to read something good just seat and type it

            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