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
tex628
Community Champion
Community Champion

Date formatting - 01-01-01, 1899-12-31

Hi,

I'm experiencing some slightly strange behaviour in regard to how dates are displayed in my data.
I'm wondering if there might be anyone that has an idea why the dates are appearing as they are?

To explain the situation I'm using Odata queries to extract data from a Business Central installation and within BC the Finished dates we are refering to are BLANK. 

When the data arrives in my dataflows this is the appearance:
image.png

Next up i'm creating a dataset, using the dataflows as a datasource. Within powerquery the dates appear like this:
image.png

When the queries are loaded into PBI Desktop the finished date is displayed like this (Both Data and Report view):
image.png

Finally when the report is published the date is shown as this in PBI Service (Ignore the 2021... dates):
image.png
There are no datatype transformations done at any time during this process. The columns are extracted as datetype directly from the odata query. 

Any ideas?

Br,
Johannes


Connect on LinkedIn
2 REPLIES 2
PhilipTreacy
Super User
Super User

Hi @tex628 

I can't reproduce the issue.  If I have a date 0001-01-01 in PQ then load to PBID, it is changed to blank.  Loading this to PBI Svc it remains blank.

Isn't 30 Dec 1899 is the earliest date PBI supports?  Not sure why you're dates are being converted tothat.

Just try explicitly replacing 0001-01-01 with null in PQ.

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Hi Phil, 

From my experience all blank dates from BC installations appear to be extracted as 0001-01-01. I don't know why this is the case but before this specific case they have all been properly conveted into blanks once they loaded into desktop and still maintained that value in Service. 

Converting all the 001-01-01 values into null values would of cource solve the issue but i'd prefer to avoid it if i can simply due to the amount of work it would result in. (I'm working with 40+ tables in each BC installation and 5+ installations) 

If it's unavoidable there's not much to do but I'm rather interested in why the date fields are extracted as 0001-01-01 and why/how they suddenly can be considered 1899-12-31 once they are brought into Service. 

Not knowing if a blank date will be considered BLANK() or "1899-12-31" for calculations is quite problematic. 


Br,
Johannes


Connect on LinkedIn

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.