Suppose I have following code to convert datetime to string:
DateTime dt;
//...
string ds = dt.ToString("dd/MM/yyyy hh:mm")
If the dt is 15/02/2009 08:22, I want to the string is 15/02/2009 08:22AM If the dt is 15/02/2009 20:22, I want to the string is 15/02/2009 08:22PM
How to implement it?