Convert date c# -


i have date following format:

20/01/2011 7:15:28 pm 

i need convert like:

2011-01-20 09:24:06 

how this?

thanks in advance.

datetime.parseexact("20/01/2011 7:15:28 pm",                     "dd/mm/yyyy h:mm:ss tt",                     cultureinfo.invariantculture)         .tostring("yyyy-mm-dd hh:mm:ss") 

Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -