The Headache Posted July 24, 2008 Posted July 24, 2008 Hi Been searching the site for this answer but can't find it so I'll ask here. Please forgive if I'm in the wrong forum. I have a date field I would like to pull the QUARTER and the Year. i.e. Date is May 5th, 2007. I would like to have a return of: 2nd qtr. 2007. I have been trying the "if" calcs but not having any luck. Thanks for your time. :shocked:
mr_vodka Posted July 24, 2008 Posted July 24, 2008 Try Let ( q =Ceiling ( Month ( YourDate ) / 3 ); q & Choose ( q - 1; "st"; "nd"; "rd"; "th" ) & " qtr. " & Year ( YourDate ) )
The Headache Posted July 24, 2008 Author Posted July 24, 2008 I think I Got it. I used 2 calc fields. "Quarter Return" is the name of this field calc. If ( Month ( Date of Job ) = 1 ; "1" ; If ( Month ( Date of Job ) = 2 ; "1" ; If ( Month ( Date of Job ) = 3 ; "1" ; If ( Month ( Date of Job ) = 4 ; "2" ; If ( Month ( Date of Job ) = 5 ; "2" ; If ( Month ( Date of Job ) = 6 ; "2" ; If ( Month ( Date of Job ) = 7 ; "3" ; If ( Month ( Date of Job ) = 8 ; "3" ; If ( Month ( Date of Job ) = 9 ; "3" ; If ( Month ( Date of Job ) = 10 ; "4" ; If ( Month ( Date of Job ) = 11 ; "4" ; If ( Month ( Date of Job ) = 12 ; "4" ; "NG" )))))))))))) and "Quarter Return_Year" is the 2nd field. "Qrt. " & Quarter Return & " of " & Year ( Date of Job ) If anyone has a better scheme, I'm all ears. Thanks
mr_vodka Posted July 24, 2008 Posted July 24, 2008 I already posted one way and you do not need two calcs. Also if this is for display purposes only, you can always make a copy of the date field and just format the date field to display the quarter and year.
Ocean West Posted July 24, 2008 Posted July 24, 2008 (edited) there are several "Quarter" custom functions on brian dunnings site. Search for a Custom Function: Free library of FileMaker Pro Custom Functions Edited July 24, 2008 by Guest
Lee Smith Posted July 24, 2008 Posted July 24, 2008 Hi Stephen, Back to reality this week. Three things about your Reply. LOL The OP only has the Standard Edition. There was only one CF that dealt with Month, Year and Quarters. And, where did you get the Search box, and how do I get one. :woohoo:
LaRetta Posted July 25, 2008 Posted July 25, 2008 (edited) What is this, John? Do you feel like you are speaking into a black hole? I would think so. Hey, doesn't everyone realize John gave two answers which (see attached) appear to provide exactly what was asked for? The first is the date field itself formatted to show the quarter and the second is a calculation John provided which shows the quarter ... no custom function required, no long calculation required. :idunno: quarterdate.zip Edited July 25, 2008 by Guest
Recommended Posts
This topic is 6025 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now