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. Visual Basic
  4. dateandtimepicker in vb.net 2003

dateandtimepicker in vb.net 2003

Scheduled Pinned Locked Moved Visual Basic
csharp
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.
  • K Offline
    K Offline
    kendo17
    wrote on last edited by
    #1

    got 1 form with dateandtimepicker on it but trying to send that info to another dtp on another form but the message reads that you cannot convert string to dateandtimepicker. thank you before hand.

    D 1 Reply Last reply
    0
    • K kendo17

      got 1 form with dateandtimepicker on it but trying to send that info to another dtp on another form but the message reads that you cannot convert string to dateandtimepicker. thank you before hand.

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      What's the code you're using to get the value of your first DTP and send it to the next form?

      Dave Kreskowiak Microsoft MVP - Visual Basic

      K 1 Reply Last reply
      0
      • D Dave Kreskowiak

        What's the code you're using to get the value of your first DTP and send it to the next form?

        Dave Kreskowiak Microsoft MVP - Visual Basic

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

        this code is for the add button on my performance form that will send the details to the reservation form but it says that value of string cannot be converted to 'system windows form.TextBox frmNewBooking.txtDateOfPerformance = dtpPerformDate.Text

        J 1 Reply Last reply
        0
        • K kendo17

          this code is for the add button on my performance form that will send the details to the reservation form but it says that value of string cannot be converted to 'system windows form.TextBox frmNewBooking.txtDateOfPerformance = dtpPerformDate.Text

          J Offline
          J Offline
          jcrussell
          wrote on last edited by
          #4

          the code you want is frmNewBooking.txtDateOfPerformance.TEXT = dtpPerformDate.Text you're reading the text out of the DateTimePicker and then you need to assign it to the Text Property of the Textbox. Textboxes are more than just text - they have other properties available

          Jason

          K 1 Reply Last reply
          0
          • J jcrussell

            the code you want is frmNewBooking.txtDateOfPerformance.TEXT = dtpPerformDate.Text you're reading the text out of the DateTimePicker and then you need to assign it to the Text Property of the Textbox. Textboxes are more than just text - they have other properties available

            Jason

            K Offline
            K Offline
            kendo17
            wrote on last edited by
            #5

            yes i dont know what i was thinking had text on the others but missed on the date and time picker cheers.:laugh:

            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