Hi
In below data i want to display only Hours & minutes i.e 15:15 from 21/01/2023 15:15:00
ltrlSessionEndTime_0.Text = Result.SessionEndTime.ToString();
Thanks
Hi
In below data i want to display only Hours & minutes i.e 15:15 from 21/01/2023 15:15:00
ltrlSessionEndTime_0.Text = Result.SessionEndTime.ToString();
Thanks
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
Sachin SinghRank #66 · 26.2K reputationPosted Jan 18, 2023, 12:59 AM EST
test this
trlSessionEndTime_0.Text = Convert.ToDateTime(Result.SessionEndTime).ToString("HH:mm");Pasang TamangRank #449 · 5.6K reputationPosted Jan 18, 2023, 12:53 AM EST
Hi,
You can do string format. Check below code example.
ltrlSessionEndTime_0.Text = Result.SessionEndTime.ToString("HH:mm");If you want to use 12 hours format then use hh:mm.
Regards,
Pasang
Jitendra Gautam40 reputationPosted Jan 24, 2023, 5:17 AM EST
Hi,
you can use this if you want to show AM/PM also.
ltrlSessionEndTime_0.Text = Result.SessionEndTime.ToString("HH:mm tt");