Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Attempting to use code that works in SSMS summarizing table by date and formatting the date to 'yyyy-MMM-dd'.
The cell code throws anerror : โan implementation is missing scala.Predef$.$qmark$qmark$qmark(Predef.scala:288) com.microsoft.fabric.spark.catalog.OnelakeExternalCatalog.functionExists(OnelakeExternalCatalog.scala:386) com.microsoft.fabric.spark.catalog.InstrumentedExternalCatalog.$anonfun$functionExists$1(OnelakeExternalCatalog.scala:607โฆ)
I have tried the convert equivalent and also casting the field to a date prior to format. Still receive an error. Ive exhausted my googling capabilities today โ everything that I read says that it should work.
Solved! Go to Solution.
Hey @davemc69,
You're using T-SQL syntax in a Spark SQL environment - FORMAT doesn't exist in Spark.
Working Solutions:
SELECT COUNT(1) AS RecordCount,
DATE_FORMAT(DateTime2_Column, 'yyyy-MM-dd') AS FormattedDateField
FROM lakehouse.Schema.TableName
WHERE DateTime2_Column >= '2024-01-01'
GROUP BY DATE_FORMAT(DateTime2_Column, 'yyyy-MM-dd')
ORDER BY DATE_FORMAT(DateTime2_Column, 'yyyy-MM-dd') DESC;
2. Simple CAST approach (faster for large tables):
SELECT COUNT(1) AS RecordCount,
CAST(DateTime2_Column AS DATE) AS FormattedDateField
FROM lakehouse.Schema.TableName
WHERE DateTime2_Column >= '2024-01-01'
GROUP BY CAST(DateTime2_Column AS DATE)
ORDER BY CAST(DateTime2_Column AS DATE) DESC;
Additional Tips:
Fixed? โ Mark it โข Share it โข Help others!
Best Regards,
Jainesh Poojara | Power BI Developer
Hey @davemc69,
You're using T-SQL syntax in a Spark SQL environment - FORMAT doesn't exist in Spark.
Working Solutions:
SELECT COUNT(1) AS RecordCount,
DATE_FORMAT(DateTime2_Column, 'yyyy-MM-dd') AS FormattedDateField
FROM lakehouse.Schema.TableName
WHERE DateTime2_Column >= '2024-01-01'
GROUP BY DATE_FORMAT(DateTime2_Column, 'yyyy-MM-dd')
ORDER BY DATE_FORMAT(DateTime2_Column, 'yyyy-MM-dd') DESC;
2. Simple CAST approach (faster for large tables):
SELECT COUNT(1) AS RecordCount,
CAST(DateTime2_Column AS DATE) AS FormattedDateField
FROM lakehouse.Schema.TableName
WHERE DateTime2_Column >= '2024-01-01'
GROUP BY CAST(DateTime2_Column AS DATE)
ORDER BY CAST(DateTime2_Column AS DATE) DESC;
Additional Tips:
Fixed? โ Mark it โข Share it โข Help others!
Best Regards,
Jainesh Poojara | Power BI Developer
Hi @davemc69
I can see that FORMAT is visible in DimDate, even with shortcut mode as well in my version of SSMS. or am I missing something?
Hi @davemc69,
Checking in to see if your issue has been resolved. let us know if you still need any assistance.
Thank you.
Hi @davemc69,
We havenโt heard back from you in a while regarding your issue. let us know if your issue has been resolved or if you still require support
Thank you.
Check out the November 2025 Fabric update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!