The Mad Jammer Posted May 23, 2005 Posted May 23, 2005 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.
comment Posted May 23, 2005 Posted May 23, 2005 Date(12; 28; 1800) + FIELD1 should work. Examine the actual data and data type of FIELD1 - most likely the problem is there.
The Mad Jammer Posted May 23, 2005 Author Posted May 23, 2005 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
comment Posted May 23, 2005 Posted May 23, 2005 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) ?
The Mad Jammer Posted May 24, 2005 Author Posted May 24, 2005 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. the Mad Jammer
Recommended Posts
This topic is 7191 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now