I am building a booking service in VB using Visual Studio 2012 and it uses a database. I was wondering how to rearrange dates from VB format (“MM-dd-yyyy”) to MySQL date format (“yyyy-MM-dd”). Any suggestions would be greatly appreciated 🙂
Share
The
Date.ToStringmethod allows you to specify a format:However, it would be MUCH better to use a parameterized command using an actual
Datevariable and let the system convert for you, since the actual string format you need will depend on your current culture. For instance: