Skip to content
Home » EDate function in Power Apps

EDate function in Power Apps

The EDate function in Power Apps is used to calculate a date that is a specific number of months before or after a given date.

It returns a Date value. No time component is included, even if one was present in the input Date/Time.




Syntax:

EDate(StartDate, NumberOfMonths)
  • StartDate: Required. The base date from which you want to calculate.
  • NumberOfMonths: Required. The number of months to add (if positive) or subtract (if negative) from the start date.

Examples:

Adding months to a dates

Following formula in Power Apps uses the EDate function to calculate a date that is 3 months after November 5, 2024.

EDate(
    Date(
        2024,
        11,
        05
    ),
    3
)
The result will be February 5, 2025.
Subtracting months from dates

Following formula in Power Apps formula uses the EDate function to calculate a date that is 3 months before November 5, 2024.

EDate(
    Date(
        2024,
        11,
        05
    ),
    -3
)
It calculates a date that is 3 months before November 5, 2024. The result will be August 5, 2024.

When to use EDate

The EDate function in Power Apps is useful in situations where you need to add or subtract a specific number of months from a given date. Here are some key scenarios where you would use the EDate function.

  • EDate is perfect for adjusting dates by a specific number of months in the future or past.
  • It is helpful for tasks related to time-based calculations like expiration dates, scheduling, and periodic financial or operational tasks.
  • When generating reports, you may need to look at data from a certain number of months before the current date. The EDate function helps you dynamically calculate past date ranges.




Also Read..

Loading

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from SQL BI Tutorials

Subscribe now to keep reading and get access to the full archive.

Continue reading