How to get AM/PM value from datetime object in C#
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
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
Guest UserRank #816 · 2.8K reputationPosted Aug 10, 2022, 3:10 AM EDT
dateTime.ToString("tt", CultureInfo.InvariantCulture);Rajanikant HawaldarRank #110 · 20.2K reputationPosted Aug 10, 2022, 3:12 AM EDT
Sachin SinghRank #66 · 26.2K reputationPosted Aug 10, 2022, 3:12 AM EDT