Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calculating Time
Message
 
À
25/11/2002 10:23:21
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00726430
Message ID:
00726449
Vues:
17
Hi Jim,

To subtract two DataTime instances, you can use the Subtract method of the DataTime class like in the following example:
'Get Current DateTime
Dim date1 As New System.DateTime.Now

'Time passes ...

'Get Current DateTime
Dim date2 As New System.DateTime.Now

Dim diff1 As System.TimeSpan
diff1 = date2.Subtract(date1)
For more information, see the on-line help topic:

ms-help://MS.VSCC/MS.MSDNVS/cpref/html/frlrfsystemdatetimeclassop_subtractiontopic.htm

>All,
>
> I am creating a webform that will be used to track time for project tasks. The user will click a button when a task is started and when it is completed. Then they will click another button to calulcate the total time for the task. I need to know how to calculate the time. Is there a function to do this? Are there any articles that explain how to do this with .net? Is there a better way to do this?
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform