This year I was working mostly on Power Automate. It was very regular practice to get Day, Month and Year in power Automate in various format. If you are a Power Platform Consultant then there are chances that you spend much more time in automating your business requirements using Power Automate.
As Power Automate is being stronger day by day, there are still some areas where basics are not covered yet. One of these area is a date components. For the live projects, working with the date and time components is very crucial part. We need to play with the individual components of a date like Year, Month, Day, Hours, Minutes, Seconds etc. rather than the whole date value.
In Today’s blog I am going to cover the below topics.
Get Year/ month/ date from a date value in Power Automate
Get Year/ Month/ day of week in string format from a date value in Power Automate
For an example I am going to take current date as a base date. Below are the expressions to get the each of the date component.
Get Year
int(formatDateTime(utcNow(), 'yyyy'))
Get Month Number
int(formatDateTime(utcNow(), 'MM'))
Get Month Abbreviation Jan, Feb, Mar..
formatDateTime(utcNow(),'MMM')
Get Full Month Name (January, February, March)
formatDateTime(utcNow(),'MMMM')
Day of a Week (Number)
dayOfWeek(utcNow())
Day of Week (Monday/ Tuesday/ Wednesday)
formatDateTime(utcNow(), 'dddd')
Date
formatDateTime(utcNow(), 'dd')
Hope this post helps you to get date calculations!
By this way we can Get Day, Month and Year in Power Automate
Below post may help you as well in Power Automate.
Solved: Send approval request to a group in MS flow
Solved: Move is not Supported on Destination Library that has smaller version limit than source.
Power Automate Interview Questions and Answers
Create Approval workflow in MS Flow Step-By-Step
Thank you for the reading this Post. Please comment below if you have any questions. If you like this post then please share it with whoever need it. Thanks!!! Happy Coding!!!!