asp.net - Display only the Time in C# -


i'm new here, i'm stuck in converting array of strings values of "1024" , "2255" time value.

i need convert strings times format: "10:24 am". how that?

thanks in advance.

something (off mind):

var mystring = "2255"; var datetime = datetime.parseexact(mystring,"hhmm", system.globalization.cultureinfo.currentculture); var convertedstring = datetime.tostring("hh:mm tt"); 

convertedstring should have "10:25 pm"


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -