I tried to save some things in a log table with a timestamp, so I did this first:
public static string TimeStamp( this DateTime datetime, string timestamptFormat = "yyyyMMddHHmmssffff") { return datetime.ToString(timestamptFormat); }
And then I found this snippp:
static public string ToReverseTimestamp(this DateTime dateTime) { return string.Format("{0:10}", DateTime.MaxValue.Ticks - dateTime.Ticks); }
I began to wonder why it is useful to use a reverse timestamp, and came across in this article
Now my question is: if the second snippet is correct? And how do you convert it back to a βnormalβ timestamp, or how do you get readable time and time information from it?
Agzam source share