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. date conversion and option strict on

date conversion and option strict on

Scheduled Pinned Locked Moved Visual Basic
question
3 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.
  • L Offline
    L Offline
    leezardd
    wrote on last edited by
    #1

    With Option Strict On...How do I get a date from a textbox to a variable defined as date?

    S R 2 Replies Last reply
    0
    • L leezardd

      With Option Strict On...How do I get a date from a textbox to a variable defined as date?

      S Offline
      S Offline
      Steven Campbell
      wrote on last edited by
      #2

      myDate = DateTime.Parse(myTextBox.Value)


      my blog

      1 Reply Last reply
      0
      • L leezardd

        With Option Strict On...How do I get a date from a textbox to a variable defined as date?

        R Offline
        R Offline
        RDoes
        wrote on last edited by
        #3

        Generaly when the option stict on is set you can convert value's on two way's 1- use the ctype like Dim MyDate as Date MyDate = cType(me.textBox1.text, Date) 2- Using the Cast method. I must check some things how that is working I never needed yet. I respond on this later.

        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