Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Date Calculation

Featured Replies

Fields: Date, Tax Year

Please note dates are d/m/y as I am in UK.

I want Tax Year entry to be automatic depending on Date,

e.g. Tax Year '2009-2010' would apply to all records dated 6-4-2009 to 5-4-2010.

When I tried a Calc it did not work. I then experimented with a script using single dates instead of a range and found that my Calc (Date < "5/4/2009") is merely operating on the first digit and therefore triggers dates starting with a digit below 5 and ignores month and year,

e.g. ignores 6/4/2008, 7/6/2010 but triggers 13/4/2008 and 3/5/2010.

I tried a simple find for the range of dates and this worked.

I have searched but cannot see what I need to do to make my Calc respect the date.

Help!

Thanks

Keith

If your field is named TheDate and your date is in d/m/y, then

theDate < Date(4; 5; 2009)

is what you need when making a simple comparison.

Put together multiple comparisons with parentheses and "and", e.g. ( a < :) and ( a > c)

The Date() function takes month, day, year values and converts them into an internal FileMaker date.

See also Day(), Month(), Year() functions for extracting those pieces as numbers from a date.

Edited by Guest

Try =


Let ( [

y =  Year ( Date ) ; 

t = y - ( Date < Date ( 4 ; 6 ; y ) 

)

] ;

t & "-" & t + 1

)

Result type should be Text.

This should work foe ANY year - assuming your tax year always starts on April 6th.

Edited by Guest

  • Author

Thanks very much to both.

I have managed to set it up so that it applies automatically to any year.

Just what I wanted.

Thanks again.

Keith

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.