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.

Featured Replies

I have a date field called CNTDATE and I require a field that displays the following:

if the day of CNTDATE falls between 16th and the last day of the month ,it shows the day as the 10th and the following month ie (CNT DATE = 18/1/2008)

Result = 10/2/2008

but if the CNTDATE day is between 1st and 15th (January, for example)

Result = 25/1/20008

here is what I have so far for my "calc" field:

If (Day ( CTNDATE ) ≥ 16 ; Day ( 25 ) & Month(CTNDATE +1 ) & Year ( CTNDATE ) ; Day ( 10 ) and Month ( CTNDATE ) and Year ( CTNDATE ))

Calc result is DATE

can anyone show me where I am going wrong and should I have the field as a date field with a calculated value or a Calc field?

thanks

First you are using "&" in the first expression, "and" in the second one. Neither is correct, since the former returns a text result and the latter a logical one. You need to use the Date() function to construct a valid date from its elements. Also, Day (25) does not do what you think it does.

If (

Day ( CTNDATE ) ≥ 16 ;

Date ( Month ( CTNDATE ) + 1 ; 10 ; Year ( CTNDATE ) ) ;

Date ( Month ( CTNDATE ) ; 25 ; Year ( CTNDATE ) )

)

should I have the field as a date field with a calculated value or a Calc field?

If you don't intend to override the calculated result by a manual entry, make it a calculation field.

Edited by Guest

  • Author

thanks, I see where I went wrong.

I think your example should have read:

If ( Day ( CTNDATE ) ≥ 16 ; Date ( Month ( CTNDATE + 1 ) ; [color:red]10 ; Year ( CTNDATE ) ) ;Date ( Month ( CTNDATE ) ; [color:orange]25 ; Year ( CTNDATE ) ) )

I have just tried this and it doesn't seem to work properly - the month is not moving on

Sorry, I had left another mistake in there - too much copying and pasting. Fixed now.

  • Author

Sorry, I had left another mistake in there - too much copying and pasting. Fixed now.

What was the other mistake?

Closing parenthesis placed incorrectly. You had:

Month(CTNDATE +1 [color:red])

which I copied and didn't correct. It should be:

Month(CTNDATE[color:red]) +1

  • Author

Thanks so much , What a big difference a couple of () can make

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.