ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.ddmmyyyy hh:mm:ss DateTime format in C#<p>Try this</p> <pre class="brush: csharp">string d = DateTime.Now.ToString(&#34;dd/mm/yyyy hh:mm:ss&#34;);</pre> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/109578/ddmmyyyy-hhmmss-DateTime-format-in-C/https://www.aspforums.net:443/Threads/109578/ddmmyyyy-hhmmss-DateTime-format-in-C/Fri, 09 Mar 2012 07:05:33 GMTddmmyyyy hh:mm:ss DateTime format in C#<p>i want to get time in hh:mm format only</p> <p>but i get hh:mm AM</p> <p>i am getting the data either from datareader or form textbox</p>https://www.aspforums.net:443/Threads/109578/ddmmyyyy-hhmmss-DateTime-format-in-C/https://www.aspforums.net:443/Threads/109578/ddmmyyyy-hhmmss-DateTime-format-in-C/Fri, 09 Mar 2012 23:31:28 GMTddmmyyyy hh:mm:ss DateTime format in C#<p>&nbsp;</p> <pre class="brush: csharp">string d = DateTime.Now.ToString(&#34;dd/MM/yyyy hh:mm tt&#34;);</pre> <p><br />Output</p> <p>10/03/2012 02:23 PM</p>https://www.aspforums.net:443/Threads/109578/ddmmyyyy-hhmmss-DateTime-format-in-C/https://www.aspforums.net:443/Threads/109578/ddmmyyyy-hhmmss-DateTime-format-in-C/Sat, 10 Mar 2012 01:54:17 GMTddmmyyyy hh:mm:ss DateTime format in C#<p>its solved i used string.format{0:dd/MM/yyy}</p>https://www.aspforums.net:443/Threads/109578/ddmmyyyy-hhmmss-DateTime-format-in-C/https://www.aspforums.net:443/Threads/109578/ddmmyyyy-hhmmss-DateTime-format-in-C/Sat, 10 Mar 2012 23:53:15 GMTddmmyyyy hh:mm:ss DateTime format in C#<p>Where is Time in that? You asked for time format right?</p>https://www.aspforums.net:443/Threads/109578/ddmmyyyy-hhmmss-DateTime-format-in-C/https://www.aspforums.net:443/Threads/109578/ddmmyyyy-hhmmss-DateTime-format-in-C/Sat, 10 Mar 2012 23:55:26 GMT