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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Adzam
Regular Visitor

Format Clarion Date

Hi,

I am importing data from SQL server 2010.

Several columns are in clarion date format. How do I format the field to display the date correctly.

In excel its easy, just subtract 36161 from the text field (in clarion date format) then format the field to display the date.

How do i achieve this in power bi ?
1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

Hi @Adzam,

 

In Power BI, you can still use the same logic to clarion date, please refer to below M code. Open Query Editor mode, add a custom column:

 

=Date.AddDays(DateTime.FromText("1900-01-01"), [Clarion Date]-36161)

1.PNG

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yulgu-msft
Employee
Employee

Hi @Adzam,

 

In Power BI, you can still use the same logic to clarion date, please refer to below M code. Open Query Editor mode, add a custom column:

 

=Date.AddDays(DateTime.FromText("1900-01-01"), [Clarion Date]-36161)

1.PNG

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello guys,
I was with this same problem and I followed your advice, however, in my case when I subtracted the value of -36161 in Powerbi my dates were always two days apart from the real. So instead of subtracting -36161 I subtracted -36163 and ready worked! My question is if I made it right by making this change and if that solution could affect me in the future? I thank the attention.

 

Follow the code used

=Date.AddDays(DateTime.FromText("1900-01-01"), [Clarion Date]-36163)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.