MS Access Dates

Results 1 to 2 of 2

Thread: MS Access Dates

  1. #1
    Join Date
    Dec 1969

    Default MS Access Dates

    Hi,<BR><BR>I&#039;m having trouble inserting dates into ms access. Here is my query.<BR><BR>set rs = conn.Execute("update heln_test_plans set en_complete = "&x_en_complete&", "_ <BR>& "en_area = &#039;"&CStr(x_en_area)&"&#039;, "_<BR>& "en_doc_name = &#039;"&CStr(x_en_doc_name)&"&#039;, "_<BR>& "en_complete_date = #"&CDate(x_en_completion_date)&"#, "_<BR>& "en_executor = &#039;"&CStr(x_en_executor)&"&#039; where en_key = "&tkey&"")<BR><BR>The date is in format mm/dd/yyyy. In access i have the date field set up as short date. The insert works fine, but the only date that get inserted is 12/30/1899. So access isn&#039;t recongizing the date format. Can someone help me. <BR><BR>Thanks.<BR>Julie

  2. #2
    Join Date
    Dec 1969

    Default RE: MS Access Dates

    Try inserting the date as:<BR>1 Janaury 2003<BR><BR>That way it can never get confused. Oh yeah, and the date in Access is actually stored rather differently to "mm/dd/yyyy" - that flag is only a display parameter. Don&#039;t leave it up to it to "convert" dates back and forth - give it something it can&#039;t ever get confused with.<BR><BR>Craig.

Posting Permissions

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