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
ds ps
NA
61
0
comparing dates
Aug 18 2009 5:13 AM
i have a textbox control which displays date (only in MM/dd/yyyy format) from database & a datetime picker for entering another date (usually current date but might be past or future date).When user pickes the date from datetime picker, i have to compare this date with textbox's date and throw some message.Can anyone help me in this matter? i tried with following codes
string
textdate1 =
textbox.text;
string
textdate2 =
datetimepicker1.text;
System.
DateTime
d1 = System.
DateTime
.Parse(textdate1);
System.
DateTime
d2 = System.
DateTime
.Parse(textdate2);
if
(System.
DateTime
.Compare(d1, d2) < 0)
{
MessageBox
.Show(
"date 2 is later then date 1"
);
}
its urgent plz...
Reply
Answers (
16
)
Reference About WPF
font property of richtextbox