c# write timestamp in database code example Example: c# datetime to timestamp DateTimeOffset.UtcNow.ToUnixTimeSeconds()