Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

  • 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

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

  • 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

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

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

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.