Results 1 to 6 of 6

Thread: SQL Syntax URGENT

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2000
    Location
    Singapore
    Posts
    59

    Post

    Hi all,
    I have an access table and one of the field is entrydate (date and time is the datatype) field. I have customer id also.
    For everyday transaction I need to know whether the customer is calling for second time.
    I created query select * from [table name] where customer_id = '" & txtcid & "' and
    *****(entrydate) = #'" & Date & "'#

    ie. I am referring the date as the system date.
    Now my porblem is how to convert the database [date and time ] field into a date
    for my query .
    anyone help me please
    My advance thanks.

    karun

  2. #2

    Thread Starter
    Member
    Join Date
    Jan 2000
    Location
    Singapore
    Posts
    59

    Post

    Hai all,
    I had found the way for my problem.
    I used datevalue function which is quiet ok for my problem.
    Anyway thanks for listening.

    Thanks
    karun

  3. #3
    New Member
    Join Date
    Aug 1999
    Location
    Bombay,India
    Posts
    10

    Post

    Try usign the Format function to format the date accordingly.
    ;-)


  4. #4

    Thread Starter
    Member
    Join Date
    Jan 2000
    Location
    Singapore
    Posts
    59

    Post

    Hai Jaspal,
    Format Function is giving syntax error.i am not able to use it.
    it is giving error on the double quotes of the format function.

    thanks
    karun

  5. #5
    Frenzied Member
    Join Date
    Aug 1999
    Location
    Santa Clara, Ca , 95058
    Posts
    1,105

    Post

    Compare CInt(Date) to CInt(recordset.datefield) to see if there's a match.

  6. #6

    Thread Starter
    Member
    Join Date
    Jan 2000
    Location
    Singapore
    Posts
    59

    Post

    Hai JHausmann,
    I think you may understood my problem in a different way. My problem is how to format a date&time database field into a date to put in a search query.

    I solved it using datevalue function.It works fine.

    Anyway thanks a lot for your response.

    Have a nice day

    Karun

Posting Permissions

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



Click Here to Expand Forum to Full Width