How to Format Date and Time in Kusto Query | DateTime Format Function in Kusto

Topic: How to Format Date and Time in Kusto Query Language

In this article, we are going to learn about to format_date time functions so often we need to format the date and time according to our requirement maybe we want to create a report and export to excel and all that and we would like to export that date time specific formatKusto Query Language is a powerful tool to explore your data and discover patterns, identify anomalies and outliers, create statistical modeling, and more. The query uses schema entities that are organized in a hierarchy similar to SQL's: databases, tables, and columns.


 //format_datetime() -- Formats a datetime according to the provided format.  
 // This has alot of formats, check this out  
 //https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/format-datetimefunction  
 //Let's create a table Customer  
 //.drop table Customer  
 .create table Customer (CustomerId: long, FName: string,LName:string, Salary: int,hiredate:datetime)   
  .ingest inline into table Customer <|  
 1,Aamir,Shahzad,2000,2021-11-28T04:52:43.8745893Z  
 2,Raza,ALI,4000,2018-11-28T04:52:43.8745893Z  
 3,Lisa,Rivers,50000,2021-12-28T04:52:43.8745893Z  
 4,steve,Ladson,1000,2010-09-28T04:52:43.8745893Z  
 5,Robert,Jr,500,2015-01-20T04:52:43.8745893Z  
 6,aamir,ali,1000,2005-03-01T04:52:43.8745893Z  
 Customer  
 | extend   
 SampleFormat1=format_datetime(hiredate,'y-M-d')  
 ,SampleFormat2=format_datetime(hiredate,'yy-MM-dd')  
 ,SampleFormat3=format_datetime(hiredate,'yyyy:MM:dd')  
 ,SampleFormatTime=format_datetime(hiredate,'h:m:s')  

Video Demo: How to Format Date and Time in Kusto Query

11 comments:

  1. Get the best business assignment help online from a top-rated assignment expert. We have over ten years of assignment assistance experience. accounting essay assignment help offers all types of assignment assistance to college and university students. For all assignment help, our assignment helpers in uk guarantee on-time delivery and plagiarism-free content.

    ReplyDelete
  2. High School Students Searching for Rajasthan Board 6th, 7th, 8th, 9th class Previous Question Paper 2023 we have Attached the past few year Paper 2023s here go through the Details and Download those Paper 2023s you want. RBSE 6th Class Question Paper 2023 Start your Preparation with Rajasthan Board 6th, 7th, 8th, 9th Model Paper 2023 to get Qualified in Rajasthan Board High School Exam with more marks, Candidates are Advised to Practice Through Raj Board 6th, 7th, 8th, 9th Sample Paper 2023

    ReplyDelete
  3. Services where you can buy a case brief https://topwritingservice.com/buy-a-case-brief have yielded great results for many students struggling with the demands of legal studies. These professional services provide valuable assistance with summarizing and analyzing legal cases, ultimately helping students reduce stress and increase their chances of academic success.

    ReplyDelete
  4. Hello everyone! I hope you're having a great day. I wanted to share with you all my wonderful experience with Alyaka, my trusted online beauty store. They offer a wide range of products that not only enhance beauty but also promote overall wellbeing https://www.alyaka.com/collections/wellbeing . If you're looking for high-quality beauty and wellness products, I highly recommend checking out Alyaka's collection . You won't be disappointed! Happy shopping!

    ReplyDelete
  5. Мы в компании Art-Puf производит кресло мешок футбольный мяч по лучшим ценам и с большим ассортиментом который даёт возможность каждому выбрать то что ему нравится ! Подробнее тут https://art-puf.com.ua/shop/kupit_kreslo_meshok_mjach-2012-06-26-70

    ReplyDelete
  6. there mates, it is incredible composed piece completely characterized, proceed with the great work always. dissertation writing services uk

    ReplyDelete
  7. Very often I hear from students that they have difficulties writing student essays because they do not finish on time. Therefore, I advise you to use it catchy essay title generator essayshark writing tools to consistently complete student assignments on time

    ReplyDelete
  8. that distributes high dividends and various events with some restrictions when using the Toto site. Companies that engage in the work of excellent developers and maintain buy dissertation Service UK

    ReplyDelete
  9. We continually attempt to provide the necessary support within the timeframe provided we will surely meet your request for exceptional assignment assistance. Our professionals undergo ongoing education to ensure students receive the highest quality Assignment Writing Service Dubai we can't afford to compromise on quality, so we only hire the top writers.

    ReplyDelete
  10. This is a fantastic post that highlights the potential of Kusto Query Language and demonstrates how to generate reports in Excel. Additionally, it helps academic students, and we are learning from your post. Assistance with writing a report . Thanks for sharing.

    ReplyDelete
  11. Juegabet Chile es un popular sitio de entretenimiento en línea, reconocido por su variedad de opciones de apuestas deportivas y juegos de casino. Con una plataforma segura y fácil de usar, es la elección preferida de muchos para disfrutar de emocionantes experiencias de juego.

    ReplyDelete