var Timestamp = new DateTimeOffset(DateTime.UtcNow).ToUnixTimeSeconds();
String timeStamp = GetTimestamp(DateTime.Now);
public static String GetTimestamp(DateTime value)
{
return value.ToString("yyyyMMddHHmmssffff");
}
// ...later on in the code
String timeStamp = GetTimestamp(new DateTime());
Console.WriteLine(timeStamp);
DateTime now = DateTime.Now;
Console.WriteLine("NOW: " + now);
String timeStamp = GetTimestamp(new DateTime());