?
Solved

Timespan question

Posted on 2011-10-24
2
Medium Priority
?
289 Views
Last Modified: 2012-08-13
If i have a timespan variable name dtspan and I convert the variable to total minuets with dtspan.totalminutes and write that total minutes value to a Database table.

When I retrieve the total minutes from the DB later can I place it into a timespan variable to be able to the convert the total minutes into a day, hour, minute format. Keep in mind that the minutes are stored as integers in the DB table.

Thanks,

Ty
0
Comment
Question by:tybarton
2 Comments
 
LVL 4

Accepted Solution

by:
Gruff82 earned 2000 total points
ID: 37018451
Hi Tybarton,

Yes you can in order to do it just use the constructor that takes hours, minites and seconds.

var timespan = new System.TimeSpan(0, numberOfMinites, 0)

Thanks

Gruff
0
 

Author Comment

by:tybarton
ID: 37018471
Excellent. Thank you!

Ty
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question