Forum Discussion
ChrisMajestic
2 years agoFrequent Visitor
How to prevent automatic datatype conversion with database connection
I have Power BI Report Server (May 2023) pulling in data from an ODBC connection. One of the fields is a duration field in the format 00:00:00 (hours, mins, secs). Since the numbers look like a time ...
d_gosbell
2 years agoSuper User
So this could also be an issue with type conversion in the ODBC driver. You could try doing the conversion to a string explcitly in a view or SQL query so that it's done by the source database engine.
ChrisMajestic
2 years agoFrequent Visitor
Sounds interesting. How do I do that?
- d_gosbell2 years agoSuper User
It depends on what sort of database server you are pulling the data from. In SQL Server you could use the CONVERT() function with the optional 3rd parameter to specify the format. The DBA for your source database might be able to help with this.