Announcements
I am creating a flow in Power Automate Desktop (version 2.57.184.25154) to retrieve the datetime one month prior to the current date.
For example: If the current month is 202506, I want to get 202505.
I used the "Get current date and time" action to generate a datetime-type variable, and passed it to the "Subtract dates" action. However, the following error is displayed:
Error message: The argument 'SubtractDate' must be of type 'Datetime'.
The argument 'SubtractDate' must be of type 'Datetime'.
The variable is recognized as a Datetime value, and I believe its type is correct.
I have tried:
Renaming the variable
Restarting Power Automate Desktop
Reinstalling the application
But the same error continues to occur.
Below is the structure of the flow:
Get current date and time → %現在日時_raw%
%現在日時_raw%
Subtract dates → %現在日時_raw% minus 31 days → %前月日時%
%前月日時%
I would appreciate it if you could provide any possible causes or similar known issues.
DateTime.GetCurrentDateTime.Local DateTimeFormat: DateTime.DateTimeFormat.DateAndTime CurrentDateTime=> CurrentDateTime DateTime.Add DateTime: CurrentDateTime TimeToAdd: -1 TimeUnit: DateTime.TimeUnit.Months ResultedDate=> ResultedDate Text.ConvertDateTimeToText.FromCustomDateTime DateTime: ResultedDate CustomFormat: $'''yyyyMM''' Result=> FormattedDateTime
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Users!
Congratulations to our 2025 community superstars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Haque 592
Valantis 340
11manish 284