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.

While many VB (Visual Basic) versions were the same I'd research this with the usual search engine with "visual basic date calculations" to discover what functions are available and then look at the function to see if it will do.

Or if you know the month then your choice to do a simple method and not worry about if 28 or 31 days equals a month.

I won't supply code given the less than sufficient specifications plus how would you know if it's right or how to maintain your code. Let's try instead to learn more about the dates you want to find the differences from and then work from there. Supply an example of the code that holds this date as I've seen dozens of date variable types over the years.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.