How to Get the Year, Month and Day of a Date in Power Apps
Year, Month and Day take a date apart. For 8 November 2026 they return 2026, 11 and 8, as numbers, ready to build another date or time from the same day.
The example is the Log overtime screen of the Overtime Timesheet app, which takes the day a shift started apart to add the start and finish times to it.
Syntax
Year(DateTime)
Month(DateTime)
Day(DateTime)
Microsoft's Day, Month, Year, Hour, Minute, Second, and Weekday functions page describes the results:
| Function | Returns |
|---|---|
| Year | The year, starting with 1900 |
| Month | The month, 1 to 12 |
| Day | The day of the month, 1 to 31 |
All three return a number.
Prerequisites
- A date to take apart. The example uses a date picker's SelectedDate (How to Add a Date Picker in Power Apps), set to 8 November 2026.
Step 1: Get the Year
I put each formula into a text control's Text for a moment, so the preview strip under the formula bar shows its result:
Year(dpWorkDateLO.SelectedDate)

Step 2: Get the Month
Month(dpWorkDateLO.SelectedDate)
November is month 11:

Step 3: Get the Day
Day(dpWorkDateLO.SelectedDate)

What They're For
The example passes all three to DateTime, with an hour and minute, to build the moment a shift started on that day:
DateTime(Year(ShiftDate), Month(ShiftDate), Day(ShiftDate), Hour(StartAt), Minute(StartAt), 0)
How to Combine a Date and a Time in Power Apps with DateTime explains it.
For showing a date, or a month such as 2026-11, use Text instead: Text(dpWorkDateLO.SelectedDate, "yyyy-mm") gives the year and month with a leading zero (How to Format a Date in Power Apps with Text).
Common Mistakes
| Mistake | What happens | Do this instead |
|---|---|---|
Joining the numbers to show a date, Day(d) & "/" & Month(d) | No leading zeros, such as 8/11 | Text(d, "dd/mm") |
| Using Month for a month name | It returns a number | Text(d, "mmmm") |
| Taking the parts of a date that hasn't been chosen yet | The results don't describe the day you meant | Check IsBlank(dpWorkDateLO.SelectedDate) first |
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| The day is one off | The date was converted between time zones on the way | Check the value with its time: Troubleshoot date and time issues |
A text control shows 11 but you expected November | Month returns a number | Use Text with "mmmm" |
FAQ
Is there a function for the day of the week?
Yes, Weekday. Microsoft's page explains its numbering, which starts on Sunday unless you give it a different first day.
Do they work on a date and time too?
Yes. They take any date/time value and ignore the parts they don't return.
Conclusion
Year(d), Month(d) and Day(d) return a date's parts as numbers. Use them to build new dates and times; use Text to show a date.
Additional Resources
- Day, Month, Year, Hour, Minute, Second, and Weekday functions: ranges and examples.
- Date, DateTime, and Time functions: putting the parts back together.
