| | |
80Problem comparing date in MS Access and c# query
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Aug 2008
Posts: 1
Reputation:
Solved Threads: 0
Hi,
I am developing one application which requires me to compare date.The dataabse being MS access 2003.
When i execute the query in c# it does not show any record ,the date although matches with the date in database.
Where is the problem ?
The quey executed is
select * from finetable where fine_date=#1/9/2008 6:46:36 PM#
The record which matches it being
finetable (table name)
serial_no fine_date reg_no fine_place fine_code
3 1/9/2008 6:44:55 PM 125 india 123A
Why it is not showing ??
Maybe coz the time is diff. But I want to compare dates only.
Please help me !
80 in the topic name is a typo
I am developing one application which requires me to compare date.The dataabse being MS access 2003.
When i execute the query in c# it does not show any record ,the date although matches with the date in database.
Where is the problem ?
The quey executed is
select * from finetable where fine_date=#1/9/2008 6:46:36 PM#
The record which matches it being
finetable (table name)
serial_no fine_date reg_no fine_place fine_code
3 1/9/2008 6:44:55 PM 125 india 123A
Why it is not showing ??
Maybe coz the time is diff. But I want to compare dates only.
Please help me !
80 in the topic name is a typo
Last edited by akshaycjoshi; Aug 16th, 2008 at 11:46 am. Reason: typosss
•
•
Join Date: Aug 2008
Posts: 1,735
Reputation:
Solved Threads: 186
yes the time is different so it wont match, if you want to match on date alone you would need to do change it so it extracts the date from the fine_date field and the date of the part in question.. I dont have access on here to check but something like date(file_date)=#1/9/2008# would probably work.
![]() |
Other Threads in the C# Forum
- Previous Thread: how to trap the values of a particular row in datagridview
- Next Thread: 8 puzzle problem in C#
| Thread Tools | Search this Thread |
Tag cloud for C#
.net access ado.net algorithm array bitmap box broadcast buttons c# chat check checkbox class client color combobox control conversion csharp custom database datagrid datagridview dataset datetime degrees development draganddrop drawing encryption enum event excel file files form format forms function gdi+ httpwebrequest image index input install java label list listbox listener login mandelbrot math mouseclick mysql networking object operator oracle path photoshop picturebox pixelinversion post prime programming radians regex remote remoting resource richtextbox save saving serialization server sleep socket sql statistics stream string table tcp text textbox thread time timer treeview update usercontrol validation visualstudio webbrowser windows winforms wpf xml






