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