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
narasiman man
NA
0
118.3k
Doubt
Feb 24 2012 11:06 AM
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
string format = "h.m tt";
DateTime startTime = DateTime.ParseExact("0.00 AM", format, null);
DateTime endTime = DateTime.ParseExact("0.00 pm", format, null);
double totalTime = (endTime - startTime).TotalHours;
Response.Write(String.Format("Total time worked is {0} hours", totalTime));
}
}
i try this code
star time 7.00AM
end time 1100 AM
Total time output show 12 hours
output is wrong i typed the above code what is wrong in the above code please help and send the correct code with example. help me.
Reply
Answers (
1
)
"Server busy" dialog error using scanner in silverlight
hours calculation