Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
wodraeve
Frequent Visitor

SQL timestamp reads as binary... How to convert?

Hi,

 

I'm reading from a SQL Server table using Power Query, and the Timestamp Data Type is returned as a binary type in PQ.

 

How can I convert this Binary type to a DateTime / Decimal / Hexadecimal representation?

 

Thank you,

 

Wouter

3 REPLIES 3
Anonymous
Not applicable

Hi wouter,

I face the same situation : did you solved the way to convert TimeStamps to text or date time ? 
The proposed solution is not solid and documented.

 

Didier

v-yuta-msft
Community Support
Community Support

Hi wodraeve,

 

You can call Text.FromBinary(binary as nullable binary, optional encoding as nullable number) to convert binary data to text data.

Then call Date.FromText(date as nullable text, optional culture as nullable text) to convert text data to date data.

 

Also, you can call Number.FromText(text as nullable text, optional culture as nullable text) to convert text to number.

 

Regarding number to hex, you should write a custom function with a hash table, please refer to this thread: https://community.powerbi.com/t5/Desktop/convert-from-hexadecimal-value-to-number/td-p/28435.

 

All the function above can be wrapped like Date.FromText(Text.FromBinary(......)).

 

Regards,

Jimmy Tao

 

 

Anonymous
Not applicable

Hi Yuta,

This does not help at all : the conversion to text does not work, especially for SQL Server Timestamp, which is seen as a binary by Power BI.
Please provide convinient solution

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.