.net - How to convert string date (25.04.2016) to date format (mm/dd/yyyy)? -


i have string date (25.05.2016) ,i want convert (mm/dd/yyyy) format in vb.net. please suggest solution.

use parseexact format need string date variable, .tostring convert format:

dim datestring string = "25.05.2016" dim dateformat string = "dd.mm.yyyy" dim datevalue = datetime.parseexact(datestring, dateformat, cultureinfo.invariantculture)  debug.writeline(datevalue.tostring("mm/dd/yyyy")) 

the list of custom datetime formats can found here


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -