c# date timestamp string code example
Example 1: c# datetime now timestamp
String timeStamp = GetTimestamp(DateTime.Now);
Example 2: c# datetime to timestamp
DateTimeOffset.UtcNow.ToUnixTimeSeconds()
Example 3: c# datetime now timestamp
var Timestamp = new DateTimeOffset(DateTime.UtcNow).ToUnixTimeSeconds();