Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2003
    Location
    Penang, Malaysia
    Posts
    9

    Unanswered: Help in insert & Update date+time into table

    Ok.. Seldom use MS Access.. Need some help here.. How do I insert a date and time format into MS Access table?

    Insert into Table1
    (MyDate)
    Values (#09/21/2003 07:00:00#)

    Is the statement valid?

    The below statement work for me but is it the right what as it is a string?

    Insert into Table1
    (MyDate)
    Values ('09/21/2003 07:00:00')

    but not working when I use

    update Table1
    set Field1='No'
    where Mydate='09/21/2003 07:00:00'

    as I get some data mismatched error..

    Help anyone? Thx..

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    yes, you need the pound signs (octothorps) and not quotes

    update Table1
    set Field1='No'
    where Mydate= #2003-09-21 07:00:00#

    rudy

Posting Permissions

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