May 23, 200520 yr 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.
May 23, 200520 yr Date(12; 28; 1800) + FIELD1 should work. Examine the actual data and data type of FIELD1 - most likely the problem is there.
May 23, 200520 yr 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
May 23, 200520 yr 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) ?
May 24, 200520 yr 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. the Mad Jammer
Create an account or sign in to comment