get timestamp in seconds from datetime in c#
|
Smith
2926
Points
78
Posts
|
Answers
|
Priya
1330
Points
40
Posts
|
Use DateTimeOffset.ToUnixTimeSeconds method to get time stamp. It will returns the number of seconds that have elapsed since 1970-01-01T00:00:00Z. To get the timestamp from a DateTime:
For more detail: https://docs.microsoft.com/en-us/dotnet/api/system.datetimeoffset.tounixtimeseconds?view=net-6.0
Posted On:
16-Mar-2022 23:44
thanks. - Smith 20-Apr-2022 23:54
|


