Forum Discussion
Data discrepancy between lakehouse view and SQL endpoint view
- 1 year ago
OK, here the (not a) solution.
I opened a ticket to Microsoft for this.
It seems to be a known issue that is already in progress for a fix.
This issue only affects the cell value rendering in the Fabric UI and not the actual content of the cell.
Affected datatypes are "Date" and "Timestamp".Looking forward for a fix.
😉
Hi _maclura_ ,
Thank you for reaching out to Microsoft Fabric Community.
I have reproduced your scenario and understood that in many Spark and Delta Lake environments, DateType columns are internally stored as dates (without time), but when displayed, especially in some UIs or query outputs, they often show with a timestamp part like 00:00:00 or sometimes an offset (e.g., 01:00:00). This is a formatting artifact and does not mean the time is actually stored or used the data itself represents date only.
If you want to display dates without the time portion explicitly, the recommended approach is to convert the DateType column to a formatted string. you can use below code for conversion :
from pyspark.sql.functions import date_format
This string column will show just the date consistently both in Spark notebooks and SQL queries.
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Thank you!!