DateTime Format issue

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi Guys,

I want to get DateTime string format,
when I use DateTime.Now.ToString("HH:MM:SS"); it returns me
05:06:23, it is great. However, IF i want to display as PM or AM
How to set this? if I use ToString( "HH:MM ??") ?

Thanks
 
hi try:

DateTime.Now.ToString("HH:mm:ss tt") to give ie "20:18:54 PM"
DateTime.Now.ToString("hh:mm:ss tt") to give ie "08:18:54 PM"

steve.
 
Back
Top