+ Start a Discussion
lady_syrennelady_syrenne 

Need help with dates! URGENT!

Hi All!

 

 

I'm having hard time to fetch the startdate of fiscal year without querying it.. How can I do this? Does Anyone know?Pls. help this is very urgent!

 

 

Regards,

Lady

 

 

 

NikuNiku

Please check with this

THIS_FISCAL_QUARTER
Starts 12:00:00 on the first day of the current fiscal quarter and continues through the end of the last day of the fiscal quarter. The fiscal year is defined in the company profile at Your Name | Setup | Company Profile | Fiscal Year.

SELECT Id FROM Account WHERE CreatedDate = THIS_FISCAL_QUARTER

lady_syrennelady_syrenne

Can I use this to know the first 90 days of the fiscal year? 

NikuNiku

Yes but you need to midify in the following manner

 

NEXT_N_FISCAL_?YEARS:n 

Starts 12:00:00 on the first day of the next fiscal year and continues through the end of the last day of the nth fiscal year. The fiscal year is defined in the company profile at Your Name | Setup | Company Profile | Fiscal Year.

e.g.

    SELECT Id FROM Opportunity WHERE CloseDate < NEXT_N_FISCAL_YEARS:3LAST_N_FISCAL_?YEARS:n 

 

OR

 

LAST_N_FISCAL_YEARS

Start 12:00:00 on the first day of the last fiscal year and continues through the end of the last day of the previous nth fiscal year. The fiscal year is defined in the company profile at Your Name | Setup | Company Profile | Fiscal Year.

e.g

 SELECT Id FROM Opportunity WHERE CloseDate > LAST_N_FISCAL_YEARS:3

 

 This may help you

 Thanks