Skip to main content
Answer

Determine which Quarter of a year a date falls in

  • June 23, 2023
  • 3 replies
  • 143 views

Forum|alt.badge.img

Is there a way in a Generic Inquiry to determine the which Quarter of a year a date falls in.

I am working on a Generic Inquiry where I would like to display the Quarter of the year the SOInvoice.DoDate falls in.

Thank you!

Best answer by dcomerford

If you click on the pencil beside the Data field on the GI and then select Fields all the date fields appear and for the date fileds the date, day, hour, month, quarter can be selected so if you select the quarter one it will display the quarter number rather than the date

 

3 replies

dcomerford
Captain II
Forum|alt.badge.img+15
  • Captain II
  • Answer
  • June 23, 2023

If you click on the pencil beside the Data field on the GI and then select Fields all the date fields appear and for the date fileds the date, day, hour, month, quarter can be selected so if you select the quarter one it will display the quarter number rather than the date

 


Forum|alt.badge.img
  • Author
  • Freshman I
  • June 23, 2023

Perfect!!

Thank you!!


Forum|alt.badge.img+1

In case anyone is looking for something that doesn’t include that in the DAC here’s switch code:

 

    Switch(
Month(Today()) <= 3, 'Q1',
Month(Today()) <= 6, 'Q2',
Month(Today()) <= 9, 'Q3',
True, 'Q4'
)