i have code that takes a csharp datetime and converts it into a long to plot in the "flot" graph. here is the code
public static long GetJavascriptTimestamp(DateTime input)
{
TimeSpan span = new TimeSpan(DateTime.Parse("1/1/1970").Ticks);
DateTime time = input.Subtract(span);
return (long)(time.Ticks / 10000);
}
I now need an opposite function where i take this long value and get the csharp datetime object back. any idea if the above method can be reversed ?