Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedJoin us at the 2025 Microsoft Fabric Community Conference. March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for $400 discount. Register now
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.