Jump 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.

Calculating a date field

Featured Replies

Not sure whether this is the right forum. Apologies if not.

I have a table which lists business mileage. What I am aiming to do is to summarise the business mileage for a given tax year. (The tax year in the UK starts at the beginning of April)

I think that the best way to do this is to create a field that sets the current tax start date and then to create a related table that just shows the records starting after that date. If anyone has an easier way of doing this please shout!

So to achieve this I want a field that calculates the current tax year start date. Something like

if(CURRENTMONTH<4,(1/4/CURRENTYEAR-1),(1/4/CURRENTYEAR).

What I can't work out is the correct syntax of that calculation.

Any help appreciated!

TD

1/4/CURRENTYEAR means "divide 1 by 4, then divide the result by CURRENTYEAR" (assuming CURRENTYEAR is defined somewhere). To construct a valid date from individual elements, use the Date() function.

To get elements of current date use the Get (CurrentDate) function, e.g. Year ( Get (CurrentDate) ) returns the current year.

Create an account or sign in to comment

Important Information

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

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.