PDA

Click to See Complete Forum and Search --> : SQL Syntax URGENT


karunakaran
Feb 14th, 2000, 01:20 PM
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

karunakaran
Feb 14th, 2000, 04:49 PM
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

Jaspal
Feb 14th, 2000, 05:28 PM
Try usign the Format function to format the date accordingly.
;-)

karunakaran
Feb 15th, 2000, 09:34 AM
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

JHausmann
Feb 16th, 2000, 12:55 AM
Compare CInt(Date) to CInt(recordset.datefield) to see if there's a match.

karunakaran
Feb 16th, 2000, 08:01 AM
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