January 8, 200718 yr Newbies Hi Guys, I have hit a wall with this calculation. I need to create a text field with 2005-2006, 2006-2007 etc, based on any given date. The changeover date is April 1. Has anyone else done this or can point me in the right direction. If this is not clear I'll try and explain it more clearly. Many thanks. Seasons Greetings Gordon
January 8, 200718 yr See if this fit's: Year(Date ( Month ( aDate ) -4; Day ( aDate ) ; Year ( aDate ) )) & " - " & Year(Date ( Month ( aDate ) -4; Day ( aDate ) ; Year ( aDate ) +1)) --sd
January 8, 200718 yr I believe that would change on May 1; should be -3 instead of -4? A shorter one: Let ( [ y = Year ( Datefield ) - ( Month ( Datefield ) < 4 ) ] ; y & "-" & y + 1 )
January 8, 200718 yr Right. So: Year ( Datefield ) - ( Month ( Datefield ) < 4 ) & "-" & Year ( Datefield ) - ( Month ( Datefield ) < 4 ) + 1
January 9, 200718 yr Author Newbies : Thank you all for your posts, I don't think I'd ever have sorted it out so neatly. Best Wishes - Gordon
Create an account or sign in to comment