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

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -