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
Marvin kakuru
1.4k
354
159.6k
Trying to convert timespan value to decimal
Apr 3 2017 2:11 AM
Hello everyone, I am trying to use a timespan value for calculating different values, Like subtracting, dividing and multiplying with other decimal values but in vain. Below is the code I used to arrive at the timespan value (no of days) between two dates. DateTime endate = convert.ToDateTIme(transdate.Text); DateTime startdate = convert.ToDateTIme(lastdate.Text); TimeSpan Nodays = enddate.Subtract(startdate); Int NumberOfDays = No.Days; LabelNoOfDays.Text = NumberOfDays.ToString(); So am trying to use the value (number of days) in label "LabelNoOfDays.Text" but in vain Any help will be appreciated.
Reply
Answers (
4
)
C # application deployment with mysql database
How to calculate Tax,Qty, total amount in c#