TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
dc
NA
663
0
C# datetime compare to sql server datetime
Feb 27 2013 12:42 AM
In a C# 2010 desktop application I am using a linq to sql statement to compare a C# datetime field to a sql server 2008 r2 datetime field. By doing this comparison I am getting inconsistent results. Thus I am guessing a C# datetime field is not the same as a sql server 2008 r2 datetime value.
Thus for this comparison to work, I would like to know how to change a C# datetime field to a sql server date time field. I would think I would need to do this conversion prior to comparing the dates.
I want to compare to see if sql date > minimum date (1/1/1753) and sql date < current today's date. Can you tell me how to write this comparision?
Thus now you show me code and/or point me to a reference that will show me how to solve this problem?
Reply
Answers (
3
)
Properties in vb.net, need help
visual studion version