Jump to content

This topic is 7270 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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

Posted

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

Posted

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

Posted

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

Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.