Posts

Showing posts with the label DateTime Handling

Power Automate Desktop : Get First Working Day of the Next Month

Image
Get First Working Day of the Next Month This flow gets the current date and time and calculates the first working day of the following month. If the first day of the month falls on a Saturday or Sunday, the flow automatically selects Monday as the first working day. Step-by-Step Explanation Get the current date and time The flow starts by retrieving the current date and time and storing it in the variable Now . Add one month to the current date The flow adds one month to Now and stores the result in Nowplus1 . This step ensures we are working with the next month. Create the first day of next month The flow constructs a text value using: %Nowplus1.Month%/01/%Nowplus1.Year% This represents the 1st day of the upcoming month. It then converts this text into a DateTime variable called FirstDayOfNextMonth . Check the day of the week A mess...

Calculate Your Age in Days - Power Automate Desktop Flow

Image
Calculate Your Age in Days - Power Automate Desktop Flow This flow asks the user to select their birth date and then calculates how many days they have lived so far. Finally, it shows the result in a motivational message. Step-by-Step Explanation Show flow description The flow begins by displaying a message box explaining what the automation does: it will ask for your birth date and compute your age in total number of days. Prompt user to select their birth date A date selection dialog appears where the user picks their birthday. The selected date is saved in the variable BirthDate . Get the current date The flow retrieves today’s date (without time) and stores it in CurrentDate . Calculate the difference in days Using the DateTime.Subtract action, the flow subtracts the birth date from today's date. The result—total days alive—is stored i...

Power Automate Desktop - Date & Time Handling Flow

🔄 Power Automate Desktop - Date & Time Handling Flow This flow demonstrates how to work with date and time values in Power Automate Desktop. It shows multiple formatting methods for both date and time, using standard formats and custom formats. It also includes converting formatted text back into a DateTime value. Step-by-Step Explanation Get Current Date and Time The flow begins by retrieving the current system date and time using the action Get Current Date and Time , and stores it in the variable CurrentDateTime . Convert Date to Short Date Format (M/d/yyyy) The flow converts CurrentDateTime into short date format using a standard formatter. A message box displays the formatted date to the user. Convert Time to Short Time Format (h:mm tt) The time component of the same DateTime value is formatted into short time format, such as 2:54 PM , and displayed to the...