Search By Date
-
Hi All, There is a search technique in my page. It search record between two dates. I use Access DB. The problem is that it does not display the record on a date, although record exist on that date, my Query is as following. Select cust_orders_det.VAT, cust_orders_det.TAX from cust_orders_det, cust_order where cust_orders_det.order_id = cust_order.order_id and cust_order.order_date >=#" & ViewState("startDate") & "# and cust_order.order_date <=#" & ViewState("endDate") & "#" Pls help me. I can give u access of my page.
-
Hi All, There is a search technique in my page. It search record between two dates. I use Access DB. The problem is that it does not display the record on a date, although record exist on that date, my Query is as following. Select cust_orders_det.VAT, cust_orders_det.TAX from cust_orders_det, cust_order where cust_orders_det.order_id = cust_order.order_id and cust_order.order_date >=#" & ViewState("startDate") & "# and cust_order.order_date <=#" & ViewState("endDate") & "#" Pls help me. I can give u access of my page.
Have you included timestamp with the Date ? if not , include the timestamp for from its 00:00:00 for To its 23:59:59
Regards, Sylvester G sylvester_g_m@yahoo.com
-
Have you included timestamp with the Date ? if not , include the timestamp for from its 00:00:00 for To its 23:59:59
Regards, Sylvester G sylvester_g_m@yahoo.com
Yes I have included but it does not work yet.
-
Hi All, There is a search technique in my page. It search record between two dates. I use Access DB. The problem is that it does not display the record on a date, although record exist on that date, my Query is as following. Select cust_orders_det.VAT, cust_orders_det.TAX from cust_orders_det, cust_order where cust_orders_det.order_id = cust_order.order_id and cust_order.order_date >=#" & ViewState("startDate") & "# and cust_order.order_date <=#" & ViewState("endDate") & "#" Pls help me. I can give u access of my page.
-
Hi All, There is a search technique in my page. It search record between two dates. I use Access DB. The problem is that it does not display the record on a date, although record exist on that date, my Query is as following. Select cust_orders_det.VAT, cust_orders_det.TAX from cust_orders_det, cust_order where cust_orders_det.order_id = cust_order.order_id and cust_order.order_date >=#" & ViewState("startDate") & "# and cust_order.order_date <=#" & ViewState("endDate") & "#" Pls help me. I can give u access of my page.
Why the hashes in the string ? I've never seen that before. Are you certain there are dates in those viewstate properties ? What if you run the SQL directly on your access DB ? and, as someone said, your start date needs a time of 0:00:00 and your end date needs a time of 23:59:59, if it's going to return all records for the days specified, regardless of time.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
Why the hashes in the string ? I've never seen that before. Are you certain there are dates in those viewstate properties ? What if you run the SQL directly on your access DB ? and, as someone said, your start date needs a time of 0:00:00 and your end date needs a time of 23:59:59, if it's going to return all records for the days specified, regardless of time.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
How can i give start date 0:00:00 and end date 23:59:59. And that hashes are used for Date in Access. Also my query gives correct result. But gives problem if for example result is of Date 12/12/2007 and I want to search between 11/12/2007 and 13/12/2007.