so in python there is this thing called monthrange, which finds the date of the month for you
so let say I have
Month : 8
Year : 2020
when i write
calendar.monthrange(Year_S, Month_S)[1]
in python, it recognizes it and gave me 31
I have a set of inputs, where i'll attach, is full of years and months of the following code
i wish to create a set of column like my output, so that I can find the days in the month and then find out the remaining days that i have for my datasets.
How should i write my code in formula tool?
Solved! Go to Solution.
There is no single formula like python. But you can use formula like below to get the dates.
Workflow:
Hope this helps : )
Happy to help : ) @terrellchong
Cheers and have a nice day!
Hi @terrellchong ,
there is not function to return the last day in a month, but it is quite easy to find:
First step is to create a date data type for the first of month (IsNull is needed because of partially empty rows)
You go to the first of the next month, one day back and have the day you ned as a date. DateTimeFormat returns the day.
Let me know if it works for you.
Best,
Roland