Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2002
    Location
    California
    Posts
    2

    Angry Unanswered: Null Date gives 12/31/1899... I just want a blank!!!

    I am using ASP 3.0, ADO and Jet 4.0 to update a table that has a date/time field. There are certain fields like "CompleteDate" that will not be filled in the first time the record set is created, and not filled in for many subsequent updates of that record. When the record is finally finished the user will put in the "CompleteDate". Until then I want to not update the field. Any ideas? I am using the following code:

    rsUpdate("CompleteDate") = vbNull

    and getting 12/31/1899

    rsUpdate("CompleteDate") = "" gives me a runtime error of type mismatch. Should I just not update the item? There may be a case where the user had filled in that date, and now wants to blank it out... help????

  2. #2
    Join Date
    Feb 2002
    Posts
    2,232
    Are you using a default value for that field in the database ? What happens when you use an update statement leaving out that field ? Have you tried the keyword empty instead of vbNull ?

  3. #3
    Join Date
    Oct 2002
    Location
    California
    Posts
    2

    Thanks!!

    Your post gave me a good direction... I tried "empty" but that still gave the 1899 date. I looked in the VBScript Documentation for "empty" and it also linked me to the keyword "null". That did the trick. "vbNull" must not work any more at Windows Script 5.6. Thanks again!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •