Check out example codes for "c# datetime now timestamp". It will help you in understanding the concepts better.

Code Example 1

var Timestamp = new DateTimeOffset(DateTime.UtcNow).ToUnixTimeSeconds();

Code Example 2

String timeStamp = GetTimestamp(DateTime.Now);

Learn ReactJs, React Native from akashmittal.com