Hi,
DateTime then = new DateTime ( ... ); // the old date
double seconds = (DateTime.Now - then).TotalSeconds;
//the substraction of two datetime is a TimeSpan , if you want that the
autocomplete works on VS you shoudl do this:
double seconds = ( (TimeSpan) (DateTime.Now - then)).TotalSeconds;
Cheers,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Prabhu" <Pr******@e-tapaal.com> wrote in message
news:eK**************@TK2MSFTNGP11.phx.gbl...
Hi,
Can any one help me getting Seconds elapsed from a given date time to
current time in .Net?.
for e.g.
Suppose assume a given time date time "01-Jan-2000 00:00:00",
I should get the number of seconds elapsed from the given date time to
current date time.
Thanks & Regards
Prakash K. Prabhu