How to count the number of days in a month based on the bot running month

Hi Team,

I want to count the number of days in a month.
For ex: if am running bot on Feb then it should count the days as 28 i need to divide this count days into some other column so, where ever the bot runs it should count the days of the running month please help me.

1 Like

Hi @bhanu.priya2

.NET has DateTime.DaysInMonth(year, month)

Use as follows: DateTime.DaysInMonth(DateTime.Now.Year, DateTime.Now.Month)

i.e.
image

Kind Regards

@bhanu.priya2

Declare a Int32 variable as Days

and write as below

Hope this may help you

Thanks

Thank you so much :slight_smile:

Thank you, this is working

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.