T
Tony!
I need to take the DateTime.Now value and convert it to a value like
1238965990
Essentially, need to mimic the conversion on this web site using C#
code, so I can create update statemens for rrdtool (which is a whole
'nother thing)
http://www.esqsoft.com/javascript_examples/date-to-epoch.htm
I've tried the below examples , but I don't get the value like
########## in CDT that I need for rrdtool. .
DateTime value = DateTime.Now;
TimeSpan span = (value - new DateTime(1970, 1, 1, 0, 0, 0,
0).ToUniversalTime());
TimeSpan spann = (value - new DateTime(1970, 1, 1, 0, 0, 0,
0).ToLocalTime());
Any code snippets/help would be appreciated.. ! Thanks!
Tony!
1238965990
Essentially, need to mimic the conversion on this web site using C#
code, so I can create update statemens for rrdtool (which is a whole
'nother thing)
http://www.esqsoft.com/javascript_examples/date-to-epoch.htm
I've tried the below examples , but I don't get the value like
########## in CDT that I need for rrdtool. .
DateTime value = DateTime.Now;
TimeSpan span = (value - new DateTime(1970, 1, 1, 0, 0, 0,
0).ToUniversalTime());
TimeSpan spann = (value - new DateTime(1970, 1, 1, 0, 0, 0,
0).ToLocalTime());
Any code snippets/help would be appreciated.. ! Thanks!
Tony!