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
vijay rags
NA
68
163.4k
How to handle negative TimeSpan in silverlight
Dec 23 2011 12:15 AM
Hi,
I have two textboxes. One is the Start time and other is the end time. I need to check whether end time is greater than start time. I tried with Time Span but i need to check for Hours, Minutes, Second. If it returns with "(-)" then i need to validate. How to do that. Please find the following code.
.cs
====
DateTime dtStartTime = new DateTime();
DateTime dtEndTime = new DateTime();
TimeSpan dtDiff = new TimeSpan();
dtStartTime = Convert.ToDateTime(txtMonStarttime.Text.Trim());
dtEndTime = Convert.ToDateTime(txtMonEndtime.Text.Trim());
dtDiff = dtEndTime - dtStartTime;
Here if the dtDiff returns values with negative then i need to check and validate it. Please help.
Thanks,
Vijay
Reply
Answers (
2
)
WCF service is not working properly
"[Http_web_request_Web_Exception_Remote_Server] : NotFound"