help with date comparison

Results 1 to 5 of 5

Thread: help with date comparison

  1. #1
    krishna Guest

    Default help with date comparison

    I have a date field in database(access) and I like to do delete of all rows in that table where date is less than the system date. I tried this:<BR><BR>"Delete Bid_details where Bid_details.Auction_date &#060; &#039" & today & "&#039"<BR><BR> but it is not working. Could you please help me with this..

  2. #2 Guest

    Default RE: help with date comparison

    My Access SQL is a little iffy (I prefer MS SQL), however, I believe that a date is identified in Access by surrounding it with pound signs (#) not with a single quote.<BR><BR>If I&#039m completely off base, then I need to ask, is your variable a string variable containing the text of the date?

  3. #3
    krishna Guest

    Default RE: help with date comparison

    Thnx for ur reply. I actually tried with the # symbol format also but couldn&#039t do. I&#039ve declared it as a date only in my database and not text. Could you please give more suggestions..<BR>

  4. #4
    Vidya Guest

    Default Try this

    Try this<BR>conn.Execute("Delete Bid_details where cstr(Bid_details.Auction_date) &#060; &#039"&cstr(date()&"&#039")

  5. #5
    krishna Guest

    Default Thanks a lot- it worked!!!

    Hi, <BR> Thanks a lot for your suggestion. It worked and now I&#039m through my work..<BR><BR> Thanx again!!!<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