Jump to content
Server Maintenance This Week. ×

CurrentDate


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

Recommended Posts

Novice question here.

I'm trying to query a set of records from a database based on four criteria.

1). The complete flag is checked.

2). The ID is relevant to the query.

3). The Publish Date is today or has past.

4). The Publish time has also past on the Publish Date.

The first two are easy - via a nested FMP-if:.and. statement but I cannot seem to get a response for the others when I use CurrentDate and CurrentTime.

Any ideas?

Many thanks.

Gary

Link to comment
Share on other sites

Do it in the databse rather than in CDML: make an unstored calculation field that does the work. Say we call the field PDcheck...

If[PublishDate > Status[CurrentDate], "0", "1"]

...then you've just gotta use the CDML in your formay file...

[FMP-If: PDcheck.eq.1][/FMP-If]

Ditto for current time... do the calculation in the database and use the calc field in the CDML format file.

Link to comment
Share on other sites

The astute FMP function-o-philes would have realised by now that the function could be simplified to...

Not (PublishDate > Status[CurrentDate])

I dunno whether this would be a faster calculation, it might be because (technically) it is simpler.

Link to comment
Share on other sites

Thanks Vaughan. I've also just discovered that using the -op variable to state that the date has to be equal to and less than today followed by date=// also works. Is there a greater performance overhead doing it this way via a CDML URL?

[This message has been edited by gary jones (edited November 03, 2000).]

Link to comment
Share on other sites

This topic is 8590 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.