get timestamp in seconds from datetime in c#
Smith
2890
Points
78
Posts
|
Answers
Priya
1194
Points
33
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
|
Blog
Active User (0)
No Active User!