English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

2007-01-22 21:13:37 · 2 answers · asked by Ashish Soni 2 in Computers & Internet Hardware Monitors

2 answers

What language?

in c# you can do it like this:

DateTime now = DateTime.Now;
DateTime then = DateTime.Parse("11/12/1950");
TimeSpan nst = now.Subtract(then);

TimeSpan has several properties that will give you the minutes, seconds, etc that would look like this:

nst.TotalSeconds
nst.TotalMinutes
etc

2007-01-22 21:20:21 · answer #1 · answered by nixkuroi 2 · 0 0

Depends on the program, but a lot will handle it well with just one date and time subtracted from another. Sometimes you have to take it to pieces a bit and fiddle with things. What is the language and what are you trying to do?

2007-01-23 05:16:24 · answer #2 · answered by Older&Wiser 5 · 0 0

fedest.com, questions and answers