07-27-2013 04:28 AM
Hello friends,
I have a database (mdb / SQL) in which I am writing date/time and 4 other columns, During retrieving record I expect only date from user and retrieve records using select query, I am able to retrieve the record by giving date / time but when I am providing only date then there is no record coming out.
Thanks.
07-27-2013 05:02 AM
What is the SQL query that you are using?
Mike...
07-27-2013 05:31 AM
For reading one record
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
select * from Scaned_Report where col1 = #11:20:45 27-07-2013#
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
For reading multiple records
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
select * from Scaned_Report where col1 between #27-07-2013 09:30:20# and #27-07-2013 10:00:00#
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Done in mdb database. I want to retrive by mentioning only date.
07-27-2013 06:14 AM
In Jet there is no real clean way of selecting all the records for a specific day. The best solution seems to be to use the "between" clause and for the time portions specify "00:00:00" and "23:59:59", respectively.
Mike...
07-28-2013 10:55 PM
I already did that.I chose the time from 6AM to 6PM. becasue this is better as per my requirement.
07-29-2013 06:31 AM