March 14, 200520 yr Author Hello, I am trying to use CDML to display only the found records that are less than a date using the following code: [FMP-IF: FIELD: ExpireDate .lte. 6/30/2005 ] The problem is that this is only pulling up records referring to the month and day (not the year). So it will pull up dates like 1/9/2008 but not 9/13/2005. I can't figure out how to make it refer to the year as well... Any ideas? I've tried many different date formats in my FMP-IF statement without success. J
March 14, 200520 yr Hello, I am trying to use CDML to display only the found records that are less than a date using the following code: [FMP-IF: FIELD: ExpireDate .lte. 6/30/2005 ] The problem is that this is only pulling up records referring to the month and day (not the year). So it will pull up dates like 1/9/2008 but not 9/13/2005. I can't figure out how to make it refer to the year as well... Any ideas? I've tried many different date formats in my FMP-IF statement without success. J
March 14, 200520 yr Author Hello, I am trying to use CDML to display only the found records that are less than a date using the following code: [FMP-IF: FIELD: ExpireDate .lte. 6/30/2005 ] The problem is that this is only pulling up records referring to the month and day (not the year). So it will pull up dates like 1/9/2008 but not 9/13/2005. I can't figure out how to make it refer to the year as well... Any ideas? I've tried many different date formats in my FMP-IF statement without success. J
March 15, 200520 yr Howdy, J! I'm not sure you're going to be able to do anything to the CDML, per se. I would think your code is okay but that ExpireDate must be defined as a DATE and not as TEXT. I have not tested this with FM and CDML in a while, but the calendar system I had been working on in CDML did not seem to have this problem. I ended up using PHP/MySQL instead for other reasons, but I don't remember having trouble with date searching. If it's not the date field thing, maybe try comparing to another date field (MyChangeDate) instead of a hard-coded date [FMP-if: field:ExpireDate .lte. field:MyChangeDate] and see what happens. --ST
March 15, 200520 yr Howdy, J! I'm not sure you're going to be able to do anything to the CDML, per se. I would think your code is okay but that ExpireDate must be defined as a DATE and not as TEXT. I have not tested this with FM and CDML in a while, but the calendar system I had been working on in CDML did not seem to have this problem. I ended up using PHP/MySQL instead for other reasons, but I don't remember having trouble with date searching. If it's not the date field thing, maybe try comparing to another date field (MyChangeDate) instead of a hard-coded date [FMP-if: field:ExpireDate .lte. field:MyChangeDate] and see what happens. --ST
March 15, 200520 yr Howdy, J! I'm not sure you're going to be able to do anything to the CDML, per se. I would think your code is okay but that ExpireDate must be defined as a DATE and not as TEXT. I have not tested this with FM and CDML in a while, but the calendar system I had been working on in CDML did not seem to have this problem. I ended up using PHP/MySQL instead for other reasons, but I don't remember having trouble with date searching. If it's not the date field thing, maybe try comparing to another date field (MyChangeDate) instead of a hard-coded date [FMP-if: field:ExpireDate .lte. field:MyChangeDate] and see what happens. --ST
Create an account or sign in to comment