Date of next quarter month first day

How can we get the 1st day of next quarter month?

Example
At the moment its Oct

So it should give 01/01/2023
MM/DD/YYYY

Hi @anmita

Check out this thread

Regards
gokul

HI,

Can you try the following expression?

New DateTime(Today.Year-Cint(Today.Month>=10),{0,4,4,4,7,7,7,10,10,10,1,1,1}(Today.Month),1).ToString("MM/dd/yyyy")

Regards,

Hello @anmita

You can use the Modify Date activity to achieve the same.

Thanks

Hello @anmita How about the below one

New DateTime(Now.AddMonths(3).Year,Now.AddMonths(3).Month,1).ToString("dd/MM/yyyy")

image

Hi @anmita ,
I am sending you a sample workflow which will help you to get the most accurate output. Please go through it I hope you get your desired output.
Main.xaml (13.1 KB)

Output Screenshot:
image

Thanks & Regards,
Shubham Dutta

Hi @anmita ,

Did you want this as output :

Also check out below code :
DateQuarter.zip (1.4 KB)

Regards,
Dibyaprakash

Mark it as solution if it resolves your issue.

Thanks Everyone for your quick responses:)

Hi @ushu,

This will not work for each month.

For example :
Input : 11/25/2022
Outoup : 02/01/2023

Above one will be output from your code.

Regards,

Hi @anmita,

You can mark solution which one resolved your issue, so that others can be helpful.

Hi @anmita ,
The solution you marked won’t give correct answers in all scenarios.
It will misguide other users who will fetch for similar problem’s solution.
Please go through my solution as well as all others too and then mark the correct solution.

Thanks & Regards,
Shubham Dutta

This solution will not work for november.
You can check it using a date from november month.

Thanks @Shubham_Dutta

1 Like