insert null into datetime field

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dmorand
    New Member
    • Sep 2007
    • 219

    insert null into datetime field

    I have this query that I'm using in coldfusion:

    Insert into ps_manager_empl oyee_ids (manager_emplid ,emp_id,last_na me,first_name,h ire_dt,rehire_d t,emp_status,un ion_status)
    values ('#managerempli d#','#emplid#', '#last_name#',' #first_name#',' #hire_dt#','#re hire_dt#','#emp _status#','#uni on_status#')

    I'm trying to insert some date values, but they are entering as 1/1/1900 instead of NULL. How can I insert them as null instead?
  • code green
    Recognized Expert Top Contributor
    • Mar 2007
    • 1726

    #2
    Insert an empty value
    Code:
    field = ''

    Comment

    • ck9663
      Recognized Expert Specialist
      • Jun 2007
      • 2878

      #3
      try this:


      Code:
      Insert into ps_manager_employee_ids (manager_emplid,emp_id,last_name,first_name,hire_d t,rehire_dt,emp_status,union_status)
      values ('#manageremplid#','#emplid#','#last_name#','#firs t_name#',NULL,NULL,'#emp_status#', '#union_status#')
      Happy Coding!

      -- CK

      Comment

      Working...