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

All,

I'm puzzled about how to validate a date field, i.e. to check for impossible or incomplete dates. In FP6 I could do this with the "isvalid" calculation. FP7 seems to be more tolerant.

I have 3 numeric fields, Day_n, Month_n and Year_n, and I want to check whether the resulting date is valid. Of course, things like 1/0/2005 or 2/29/2005 should be invalid.

FP7 just returns 12/31/2004 in the first case, 3/1/2005 in the second when I use Date_d = Date(Month_n;Day_n;Year_n). Consequently, IsValid (Date_d) always returns 1. Any ideas how to do a *real* check?

Thanks for any ideas!

Lutz

How about something like

Let( D1 = Date( Month_n; Day_n; Year_n );

Month(D1) = Month_n and Day(D1) = Day_n and Year(D1) = Year_n )

?

Why not use a real date field for the data entry, then change your other fields to calculations?

Day_n = day(date_enter)

Month_n = Month(date_enter)

Year_n = Year(date_enter)

That way the date enter field would automatically validate a valid date.

...just a thought...

  • Author

Queue,

cute, this is something that works- actually,

Day_n = Day( Date( Month_n; Day_n; Year_n) )

would be enough in my case, since the day can be -1/+3 days off, at most, within the scope of my problem. Thanks! And still I am puzzled about FP7's lack of a corresponding function...

DykstrL,

the problem is that I have the day, month and year numbers to begin with- it is in the naming convention of scans I want to import into the database. The problem is that the scan names are not tamper-proof, so I just want to make sure that the date extracted from the name evaluates to a valid date.

Thanks for giving me your thoughts on this!

Lutz

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.