vb.net - Result is with the time format 2:15:59 PM but expected 14:15:59 -
i not pro vb net question newbies... have problem convert string datetime, here's portion of code:
dim aaa = datetime.parseexact("20160409 141559", "yyyymmdd hhmmss", cultureinfo.currentculture)
the result time format 2:15:59 pm expected 14:15:59
you need format result aaa date suits you.
datetime.parseexact("20160409 141559", "yyyymmdd hhmmss", cultureinfo.currentculture).tostring("yyyymmdd hhmmss")
to result of 14:15 use code above , add semicolons need inside tostring("yyyymmdd hhmmss")
function.
Comments
Post a Comment