How to Do the By using of Timestamp Now Time with Date ISO 8061 (2021-07-06T20:08:10) in Code Of Asp.net Please Help Me
How to Do the Timestamp ?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
How to Do the By using of Timestamp Now Time with Date ISO 8061 (2021-07-06T20:08:10) in Code Of Asp.net Please Help Me
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Amit MohantyRank #112 · 20K reputationPosted Apr 10, 2023, 6:43 AM EDT
You can use the
DateTime.Nowproperty in ASP.NET to get the current date and time, and then format it to the ISO 8061 date-time string using theToStringmethod with the format specifier"yyyy-MM-ddTHH:mm:ss".DateTime now = DateTime.Now; string iso8061DateTime = now.ToString("yyyy-MM-ddTHH:mm:ss");Naimish MakwanaRank #324 · 7.7K reputationPosted Apr 10, 2023, 6:44 AM EDT
Try below:
string timestamp = DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ss");Thanks