How to extract the quarter month name which belongs current month

Hi Folks,
i need to calculate the quarter month name for current month. i.e.
i have 4 quarter month Jan, April,July,October
If current month is December then the input should be October
If current month is October then the input should be July
if current month is august the input will go to july.

Please guide me. If possible pls provide sample xaml.

Thanks…!

Hi @naveen.srivastwa,

Use below code to get the current quarter.
date -> datetime variable.

date=DateTime.Now()

(date.Month - 1) / 3 + 1

So based on the current quarter number you can get the name also.

Regards,
Arivu

Hello @naveen.srivastwa

You can use below line to get current quarter…

CInt(Math.Ceiling(Now.Month/3))

Thanks,
Navneet
Happy Automation! :slight_smile:

1 Like