Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
2
Reply
How to avoid time part from datetime datafield in access database using c#
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Madhukumar Viswanathen
13y
2.2k
1
Reply
hai all
i have ms access table named table1
id item stock price code stock_date model
1
ball
125
100
1
01/08/2011 12:00:00 AM
adidas
2
bat
150
1500
2
02/08/2011 12:00:00 AM
sii
3
stump
300
100
3
03/08/2011 12:00:00 AM
sii
4
pad
50
500
10
18/08/2011 12:00:00 AM
adidas
NULL
NULL
NULL
NULL
NULL
NULL
NULL
I want to find 02/08/2011 stock_date product details
I used below code
DateTimePicker1.value= 02/08/2011
oledcommand cmd = new oledd command("select * from table1 where stock_date="+ DateTimePicker1.value.ToShortString() +"",con);
In table1 stock_date have time part. So I cannot find the data. What changes I make in the code. please help me
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
C#.net code
[Help] How to insert data from the textBox to MySQL Database in C#