Skip to content


Problem with Dates – ODBC Source asked 10 years ago
I am using an ODBC connection query to export data, and I can't get the date to format correctly. I can't use the cast as date function I can use in SQL Server 2008 to display the date as yyyy-mm-dd. When I export to a CSV, it's adding a whole timestamp including the AM at the end.

Does anyone know a good way to script this out in the query without having to rewrite a CSV file? replied 10 years ago

Additional Info:

My export has all the dates in the format of "7/26/2013 12:00:00 AM" and when I use a date calculation column, I'm getting an error that it's not being recognized as a true datetime field.

I tried to make the source datetime format be MM/DD/YYYY AM, but that might not be the best way to do it.

Best Answer answered 10 years ago
I spoke to David with eOne, and I was able to format the dates with a calculated field rather than a date calculation.

return _fieldname.tostring("MM/dd/yyyy")

If you would like to submit an answer or comment, please sign in to the eOne portal.