Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     how to compare today's date to a DB date field in a report's where condition
Go
New
Search
Notify
Tools
Reply
  
how to compare today's date to a DB date field in a report's where condition
 Login/Join
 
<turtle>
posted
Hello,
I have tried a number of things, but none of them work. I would like to put a where condition on my report that compares today's date with a date field in my DB table.

I've tried something like this:
datedif &mdyy, datefield, 'D' < 0

but it did not work, nor did something along the lines of:
today ge datefield

When I used the 'Assist' feature, it didn't seem to let me choose anything except a specific date, so that's when I started trying out other things.

Does anyone have any suggestions?

Thanks in advance.
 
Reply With QuoteReport This Post
<WFUser>
posted
You can create a defined field of the same format and compare them.

DEFINE FILE filename
TODAY/MDYY = &MDYY;
END
TABLE FILE filename
PRINT ...
WHERE DBFLD EQ TODAY
END

But a more efficient way would be to treat today's date as a literal

IF DBFLD EQ '&MDYY'
 
Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     how to compare today's date to a DB date field in a report's where condition

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.