VB.net 2010

How I want the date: 2012-01-24 11:48:40.000

How I my program is exporting the date: 1/24/2012 11:48:40 AM

currently I am using the sqlreader

myreader.GetDateTime(10) which is giving me the format of 1/24/2012 11:48:40 AM

Found the solution!

myreader.GetDateTime(10).ToString("yyyy-MM-dd HH:mm:ss")

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.