DatePart- function "Quarter"

imfarhan

Board Regular
Joined
Jan 29, 2010
Messages
123
Office Version
  1. 2016
Platform
  1. Windows
Hi
If I'm right we are in Quarter =1 ,so why my following query brings the result quarter=2 ?

Select
DatePart("q",Now()) AS Financial_Quarter,
"01/04/" & IIf(DatePart("q",Now())=1,Year(Now())-1,Year(Now())) As Fi
FROM Table_Name

Ans= 2 ?

Thanks in advance

Many thanks
Farhan
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
If I'm right we are in Quarter =1 ,so why my following query brings the result quarter=2 ?
No, we are actually in the second quarter now. The first quarter ended March 31 and the second quarter started April 1. Today is April 8, putting us in the second quarter.
 
Upvote 0
I think bit confusion, the starting quarter of the Financial/fiscal year is
Apr to Jun = 1st Quarter
Jul to Sep = 2nd Quarter
Oct to Dec = 3rd Quarter
Jan to March = 4th Quarter

As per above rule the current quarter should be " 1 " using today's date i.e. 08/Apr/2010

Sorry , bit mixing the financial jargon wording

Many thanks
Farhan
 
Upvote 0
Ah, you didn't mention that you were dealing with a non-standard quarter calendar.

Something like this calculation should work:
Code:
IIf(DatePart("q",Now())=4,1,DatePart("q",Now())+1)
 
Upvote 0
Many thanks Joe

You sorted my problem
Kind regards
Farhan
 
Upvote 0

Forum statistics

Threads
1,214,889
Messages
6,122,097
Members
449,065
Latest member
albertocarrillom

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top