Reputation: 41807
If I've got a Kusto datetime
and I want to remove the time portion, leaving just a date at midnight, what's the best way? I can do this
todatetime(format_datetime( now(), "yyyy-MM-dd"))
but surely there's a more efficient way?
Upvotes: 20
Views: 25218
Reputation: 41807
Use the startofday()
function:
startofday( now() )
or the bin()
function:
bin( now(), 1d )
Upvotes: 31