Date/Time insertion in Access2000

Results 1 to 2 of 2

Thread: Date/Time insertion in Access2000

  1. #1
    Chrace Guest

    Default Date/Time insertion in Access2000

    Trying to insert a Date/Time in a field in Access2000 from ASP, but I can&#039t get the format right. I need to insert a full time/date.<BR><BR>"insert into tabl(timdat) values(#10/10/1999 14:01:23#)" should do the trick, or..?<BR><BR>Anyone know the correct way to format it? Like, not to use &#039#&#039 or &#039:&#039, or not to use space as seperator or...

  2. #2
    Join Date
    Dec 1969

    Default RE: Date/Time insertion in Access2000

    I just ran into this problem the other day. As for inserting it into a database, what I did was assign a variable the value of date/time and then insert that variable into the date time field. In my SQL, it looked like this.<BR><BR>INSERT INTO Jobs(timdat) VALUES (&#039"&variable&"&#039)<BR><BR>Then later I did a comparison which took todays value and compared it against a date stored in my db. In that case I had to use the # signs in my SQL and it ended up looking like this.<BR><BR>SQL = "SELECT * FROM Jobs where datdate &#062;= #" & days & "# ORDER BY datdate"<BR><BR>The quotes around the # sign is what threw me off a lot, but I finally found a post that had it done correctly. Hope this helps.<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