Converting decimal fields to hexadecimal in data model?

One of the MySQL databases we have connected to Metabase stores most of its values in decimal, but outputs in hex in the applications for which it was built. Is there a way to convert the view of these fields from dec to hex in the admin side so the user side only shows the hex values? Hoping there’s something like the unix timestamp conversion option (which has also been handy for this database) that I just haven’t been able to find yet.

Hi @jennac
Yes, you should be able to use HEX(column_with_decimal) AS column_now_hex
You would need to create Views for all those tables, if you want Metabase to be able to use the data via Custom/X-Rays.

1 Like

Thank you for your help!