Focal Point
[SOLVED] Retrieve last 30 calendar days and compare it with recent activity date

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9657054096

June 28, 2018, 01:03 PM
Nihitha
[SOLVED] Retrieve last 30 calendar days and compare it with recent activity date
SL active= SLRecentActivityDate >= last 30 days and SLLockedOutFlag = ā€˜Nā€™

I need to find the number of active employees. The logic behind that is the recent activity date should be greater than or equal to the last 30 calendar days and Lockeoutflag equal to N.

The master file contains SLRecentActivity Date and SLLockedOutFlag fields.

How to compare the recentactivity date (HYYMDI) gretaer than or equal to last 30 days?

This message has been edited. Last edited by: FP Mod Chuck,


WEBFOCUS, WINDOWS, REPORTS
June 28, 2018, 01:22 PM
BabakNYC
You need to set current date and then subtract 30 days from it. Then compare your Activity Date with this new value. Start with this:

  
-SET &CURDATE=&YYMD;
-SET &PAST30D=AYMD(&CURDATE,-30,'I8YYMD'); 


Then in your report make sure activity date GE &PAST30D


WebFOCUS 8206, Unix, Windows
June 28, 2018, 05:10 PM
Doug
Checkout DATEADD
June 29, 2018, 05:44 AM
Chaudhary
you can calculate the last 30th day's date and then put your where clause on date field,

where date Ge last 30th date and date LT current date


WF Production :- WF:8.0.0.4, 8.1.05 App-studio/Developer Studio(8.1.x) ,
8.2.0.1M , 8.2.0.2 (App-Studio8.2.x),
InfoAssist/+, InfoDiscovery
Output format:-AHTML, PDF, Excel, HTML
Platform:-Windows 7, 8,10