Open In App

How To Get Current Date in Power Query?

Last Updated : 25 Jun, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

Power query is a analysis tool in excel.From 2016 version onwards it was inbuilted in the Excel . Power Query helps us to perform all type of tasks regarding to transformation.  In this article is we will see how to get current date in power query .

Getting Current Date in Power Query

To get the current date in Power Query,we use the function “=Date.From(DateTime.LocalNow())” in the Formula bar of the power Query Editor.

Let’s begin our task to create a new query in power query editor  to get the Current Date.with this we will also learn some more functions to genarate queries related to time,Date etc…

Step 1: Open a new workbook in Excel and go to the Power Query Editor by clicking on the ‘Data’ tab and selecting ‘From Other Sources’ > ‘Blank Query.’

 

Step 2: Now add function “=Date.From(DateTime.LocalNow())” in the Formula bar of Power Query

Step 3: To add another query cliccking on query box selecting ‘New Query’>’Other Sources’>Blank Query .

Step 4 : Follow step 2 Now add Function “=DateTime.LocalNow()” .

Step 5: Click on the ‘Close & Load’ button to save the changes and load the data into Excel.

Output:

Current Date and Current Date and Time in Power Query

In the above example, we have used the “ =Date.From(DateTime.LocalNow())” function to get the current date and we have used “=DateTime.LocalNow()” ,this function to genarate both Date and time in the local time zone.

For more Functions Related to Date Functions Click on Date Functions.


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads