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?
The following ISO 8601 UTC formats are currently accepted by Azure Storage. The date value is required, while the time value is optional: YYYY-MM-DD. YYYY-MM-DDThh:mm<TZDSuffix>
Overview. Kusto is built to support tables with a huge number of records (rows) and large amounts of data. To handle such large tables, each table's data is divided into smaller "chunks" called data shards or extents (the two terms are synonymous). The union of all the table's extents holds the table's data.
In order to query the data, you use Kusto Querying Language (KQL). KQL is for querying only and unlike SQL, you can not update or delete data using KQL. You can also visualize your analysis through ADE either through the 'render' command in KQL or you can connect to PowerBI and output your findings that way.
Updating single records isn't possible. You do have the option to update data in batches, by tagging it at ingestion time, and using shard-level commands (such as . replace extents) when you need to perform the 'update'.
Use the startofday()
function:
startofday( now() )
or the bin()
function:
bin( now(), 1d )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With