The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
is it possible to have in a KQL table or materialized view a date column with a such value '2024-10-24' and
not '2024-10-24 00:00:00.000'?
I'm trying to use todatetime() and format_datetime but unsuccessfully, I'd like to remove the time.
Thanks
Solved! Go to Solution.
Hi @pmscorca ,
The function format_datetime is available to fulfill your needs, please check the following KQL Query:
datatable(DateTimeColumn: datetime)
[
datetime(2024-10-24 13:45:00.000),
datetime(2024-10-25 09:30:00.000),
datetime(2024-10-26 17:15:00.000)
]
| extend DateOnly = format_datetime(DateTimeColumn, "yyyy-MM-dd")
And the final output is as below:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @pmscorca ,
The function format_datetime is available to fulfill your needs, please check the following KQL Query:
datatable(DateTimeColumn: datetime)
[
datetime(2024-10-24 13:45:00.000),
datetime(2024-10-25 09:30:00.000),
datetime(2024-10-26 17:15:00.000)
]
| extend DateOnly = format_datetime(DateTimeColumn, "yyyy-MM-dd")
And the final output is as below:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.