How to format date when Uploading Data from in-house Databases?

How to format date when Uploading Data from in-house Databases?

Hi...

I wonder how to format as a date specific data type when i upload data from in-house DB? 

whereby the db field itself is a varchar like "2012-12-31".

I realized that it can be done using csv by specifying  ZOHO_DATE_FORMAT but how to do it from in-house DB query?

Thanks in advance