To count the number of months programmatically

I developed a programme in VB for recording my income and expenditure on a daily basis.I started recording from 5th , September ,2019. On 31 March , 2020 I want to know how many months I have recorded the transactions.Here it is September,October,November,December,January,February,and March=7.
How can I get this answer -7 by running the programme.Please anybody help me to write the code for this.