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. DateTime value problem

DateTime value problem

Scheduled Pinned Locked Moved Database
databasehelptutorialquestion
2 Posts 2 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
    phantanagu
    wrote on last edited by
    #1

    Hello everybody! I have a small question. I don't know how to insert a null DateTime value into database. In my form, I have a textbox-based field named OrderDate. If the user doesn't set value of this textbox, when inserting, I consider the value 1/1/1900 is added to database unexpectedly. I don't like this, I like empty. How should I do to get empty in Database. Thanks in advance !

    It seem to be a solution or an answer.

    K 1 Reply Last reply
    0
    • P phantanagu

      Hello everybody! I have a small question. I don't know how to insert a null DateTime value into database. In my form, I have a textbox-based field named OrderDate. If the user doesn't set value of this textbox, when inserting, I consider the value 1/1/1900 is added to database unexpectedly. I don't like this, I like empty. How should I do to get empty in Database. Thanks in advance !

      It seem to be a solution or an answer.

      K Offline
      K Offline
      kubben
      wrote on last edited by
      #2

      There is a sqlDataTime object that has a null property. I would suggest passing that into the parameter. Hope that helps. Ben

      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