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. HI

HI

Scheduled Pinned Locked Moved C#
help
7 Posts 7 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.
  • N Offline
    N Offline
    Naresh123456789
    wrote on last edited by
    #1

    Please help me. How can we know wheather a user entered text in text box is in correct date format(dd/mm/yyyy). i want to show an error message when entered text is not in correctdate(dd/mm/yyyy) format.please send solution to me .thank you in advance.

    M M M L P 6 Replies Last reply
    0
    • N Naresh123456789

      Please help me. How can we know wheather a user entered text in text box is in correct date format(dd/mm/yyyy). i want to show an error message when entered text is not in correctdate(dd/mm/yyyy) format.please send solution to me .thank you in advance.

      M Offline
      M Offline
      michaelvdnest
      wrote on last edited by
      #2

      Check this article[^].

      1 Reply Last reply
      0
      • N Naresh123456789

        Please help me. How can we know wheather a user entered text in text box is in correct date format(dd/mm/yyyy). i want to show an error message when entered text is not in correctdate(dd/mm/yyyy) format.please send solution to me .thank you in advance.

        M Offline
        M Offline
        michaelqog
        wrote on last edited by
        #3

        use try{cast text to date}/catch (InvalidCastException ){here do what do u want}

        1 Reply Last reply
        0
        • N Naresh123456789

          Please help me. How can we know wheather a user entered text in text box is in correct date format(dd/mm/yyyy). i want to show an error message when entered text is not in correctdate(dd/mm/yyyy) format.please send solution to me .thank you in advance.

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

          I'm glad you got good answers for your question, however next time, I suggest you use more helpful subject for your posts. Cheers,


          Smile: A curve that can set a lot of things straight! (\ /) (O.o) (><)

          1 Reply Last reply
          0
          • N Naresh123456789

            Please help me. How can we know wheather a user entered text in text box is in correct date format(dd/mm/yyyy). i want to show an error message when entered text is not in correctdate(dd/mm/yyyy) format.please send solution to me .thank you in advance.

            L Offline
            L Offline
            Luc Pattyn
            wrote on last edited by
            #5

            use DateTime.Parse() or DateTime.ParseExact(). :)

            Luc Pattyn [Forum Guidelines] [My Articles]


            Happy Holidays!


            1 Reply Last reply
            0
            • N Naresh123456789

              Please help me. How can we know wheather a user entered text in text box is in correct date format(dd/mm/yyyy). i want to show an error message when entered text is not in correctdate(dd/mm/yyyy) format.please send solution to me .thank you in advance.

              P Offline
              P Offline
              Paul Conrad
              wrote on last edited by
              #6

              Use a more useful subject line next time :)

              "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

              1 Reply Last reply
              0
              • N Naresh123456789

                Please help me. How can we know wheather a user entered text in text box is in correct date format(dd/mm/yyyy). i want to show an error message when entered text is not in correctdate(dd/mm/yyyy) format.please send solution to me .thank you in advance.

                D Offline
                D Offline
                dhans
                wrote on last edited by
                #7

                Don't give the option to enter the date by user. Give the option to select the date from the calender. Display a popup calender and select the date from it. Make the textfield for the date to be "readonly".

                dhans

                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