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. Database & SysAdmin
  3. Database
  4. Cast from string "28/09/2006" to type 'Date' is not valid.

Cast from string "28/09/2006" to type 'Date' is not valid.

Scheduled Pinned Locked Moved Database
help
4 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.
  • B Offline
    B Offline
    bpavan_2
    wrote on last edited by
    #1

    help me to sort out this problem i had taken a date time picker and changing the format to dd/mm/yy :((

    sdf

    S M H 3 Replies Last reply
    0
    • B bpavan_2

      help me to sort out this problem i had taken a date time picker and changing the format to dd/mm/yy :((

      sdf

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

      set dateformat dmy

      1 Reply Last reply
      0
      • B bpavan_2

        help me to sort out this problem i had taken a date time picker and changing the format to dd/mm/yy :((

        sdf

        M Offline
        M Offline
        Michael P Butler
        wrote on last edited by
        #3

        bpavan_2 wrote:

        help me to sort out this problem i had taken a date time picker and changing the format to dd/mm/yy

        Are you wanting to do this in .NET code or in SQL. In .NET you'll need to use the ParseExact method of the DateTime class[^]

        Michael CP Blog [^] Development Blog [^]

        1 Reply Last reply
        0
        • B bpavan_2

          help me to sort out this problem i had taken a date time picker and changing the format to dd/mm/yy :((

          sdf

          H Offline
          H Offline
          Hesham Amin
          wrote on last edited by
          #4

          If you use SqlCommand with parameters..This an solve alot of problems like formats and sql injection.

          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