# Identifying months by name between two dates

**URL:** <https://forum.getodk.org/t/identifying-months-by-name-between-two-dates/47880>\
**Category:** Support\
**Tags:** odk-xlsform\
**Created:** [July 3, 2024, 2:44pm UTC](https://forum.getodk.org/t/identifying-months-by-name-between-two-dates/47880 "2024-07-03T14:44:44Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Xiphware](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/xiphware/32/2587_2.png) [@Xiphware](https://forum.getodk.org/u/Xiphware)\
**Post date:** [July 16, 2024, 2:27am UTC](https://forum.getodk.org/t/identifying-months-by-name-between-two-dates/47880/4 "2024-07-16T02:27:53Z")

</div>

> [@sknudson](#):
>
> I have two fields for a study period with a start and end date. I was hoping to use this information to help auto-populate the label of future questions when I need to ask about the number of visits at a health facility for each month within the study period. I was hoping to use a calculation that could pull the name of each month...

Have a look at this and see if you can adapt it to your needs. It takes in a start and end date, and then uses these to calculate the number of months in between, and then uses this to populate a repeat group for each month, labelled with their corresponding month name ("Jan", "Feb", ...). It wasn't quite clear from your description whether these needed to be _whole_ months or not - depending on the specific start and end **day** in each month - so you might need to add 1 to the total months as appropriate.

It should accommodate spans of multiple years.

[months.xlsx](https://forum.getodk.org/uploads/short-url/mMikkXlEbTSCmnT1TKzSyP49VY2.xlsx) (9.3 KB)

 ![Screenshot 2024-07-16 at 2.20.46 PM](https://getodk.b-cdn.net/uploads/default/original/3X/7/b/7b2779a83396b60893da904d5b145d5843a44052.png)

(adapted from [Calculate age in years, months and/or days](https://forum.getodk.org/t/calculate-age-in-years-months-and-or-days/46822) ... 😉 )

---

_[View the full topic](https://forum.getodk.org/t/identifying-months-by-name-between-two-dates/47880)._
