DateTime Field???

Results 1 to 2 of 2

Thread: DateTime Field???

  1. #1
    Join Date
    Dec 1969

    Default DateTime Field???

    I have a non-null datetime column in a table that may or may not have a value. What is the recommended way of handling this column when no value is specified. Do I use a dummy date like 1/1/1900 to indicate no value??? or is there another way?

  2. #2
    Join Date
    Dec 1969

    Default Why is it NON NULL???

    The obvious solution is to make it a nullable field and put a NULL there. Why wouldn&#039;t you???<BR><BR>HOWEVER...<BR><BR>What you use as a dummy value has to depend on what data you can expect.<BR><BR>Since there are still a few people left alive today who were born before 1900, a choice of 1/1/1900 for a birth date is probably not a good idea. 1/1/1800 might work, if Mel Brooks isn&#039;t around. (Sorry...old joke.)<BR><BR>If you want a value that will show up as "no date" in VBScript, the best choice is probably 12/30/1899 (see the ASPFAQs, category Dates and Times, for why that is true). That&#039;s the value you also use when you want VBS to see a time-only value, for example.<BR><BR>

Posting Permissions

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