Current location: Hot Scripts Forums » Programming Languages » Windows .NET Programming » Problem comparing date in MS Access and c# query

Problem comparing date in MS Access and c# query

Reply
  #1 (permalink)  
Old 08-16-08, 11:20 AM
akshaycjoshi akshaycjoshi is offline
New Member
 
Join Date: Aug 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Problem comparing date in MS Access and c# query

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

serial_no fine_date reg_no fine_place
3 1/9/2008 6:44:55 PM 4521 india
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 08-16-08, 08:50 PM
digioz's Avatar
digioz digioz is offline
Community Leader
 
Join Date: Oct 2003
Location: Chicago, IL
Posts: 1,898
Thanks: 2
Thanked 0 Times in 0 Posts
The date "1/9/2008 6:46:36 PM" does not equal "1/9/2008 6:44:55 PM", because the second one is off by 1 min 41 seconds. You will need to do a partial match to get a result back.

Pete
__________________
DigiOz Multimedia
http://www.digioz.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT -5. The time now is 07:26 PM.
vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.