Johnny_one_eye Posted March 14, 2005 Author Posted March 14, 2005 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
Johnny_one_eye Posted March 14, 2005 Posted March 14, 2005 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
Johnny_one_eye Posted March 14, 2005 Author Posted March 14, 2005 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
Steve T. Posted March 15, 2005 Posted March 15, 2005 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
Steve T. Posted March 15, 2005 Posted March 15, 2005 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
Steve T. Posted March 15, 2005 Posted March 15, 2005 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
Recommended Posts
This topic is 7270 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