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

jquery - Invalid Assignment Left-Hand Side -

javascript - Preserving URL fragment through CAS sign-on -

asp.net mvc - Implementing normal user/pass, Twitter & Facebook auth -