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'm attempting to import some information from a text file and need to calculate a couple of dates. The date info I'm importing is a number, which is how most dates are stored. The number represents the number of days that have passed since 12/28/1800. So I import the data into a number field (FIELD1) and then have another calculated field (cal_Date) that looks like this

Date(12; 28; 1800) + FIELD1

the result type of cal_Date is a Date.

But the only result I get in the cal_Date field is 12/28/1800 on every record.

This formula worked before under FMP 5 but doesn't seem to now. How can one add days and dates and get the correct result?

Thanks

the Mad Jammer.

Date(12; 28; 1800) + FIELD1 should work.

Examine the actual data and data type of FIELD1 - most likely the problem is there.

  • Author

Vaughan,

tried you calc and got a ? on all records. Comment's comment (no pun intended) is correct though. I tried this calc and got a real date 12/26/1996.

Date(12; 28; 1800) + 70125

I've looked at the data that I imported and its all numeric data. The fields are defined as number. FMP 7 is acting like the data is text or something.

the Mad Jammer

Dates are numbers and 70125 are added as days.

Looking at the data is not conclusive. What happens when you type a number into the field?

And what happens with Date(12; 28; 1800) + GetAsNumber (FIELD1) ?

  • Author

comment,

Please forgive me. It was late and I was tired. I actually had the field (FIELD1) defined as a date instead of a number. As soon as I changed it to a number field it worked fine.

My apologies and many thanks for your response.

Here's a beer for your trouble. cheers.gif

the Mad Jammer

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.