-
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 & "'#
***** what I need to do to convert the data&time field to a date format.
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
[This message has been edited by karunakaran (edited 02-15-2000).]
-
if you have not figured it out already.....
When you refer to the "Date" coming in, if this is a variable you created just format it: Format(YourDate,"MM/DD/YY")
[This message has been edited by swindingland (edited 02-17-2000).]
-
Hi,
the statement is
select * from [table name] where customer_id = '" & txtcid & "' and
Datediff(""d"", Date(), entrydate) = 0"
The datediff function with the "d" parameter calculates the difference between the date in days.
Roger
-
You could also try date casting:
ie cdate(varDate)