Focal Point
[SOLVED] Date Range with current month

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

February 20, 2018, 05:17 PM
srajeevan
[SOLVED] Date Range with current month
Hi,

I have a question.I don't know whether the question sounds silly or not because i thought i can easily implement it but i couldn't.
I have a report and it should run with a date range as where condition.
Where condition should be like:
YEAR > 2017 and YEAR < 2018/02

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


WF8206,Windows 7,8,10
HTM,PDF,EXCEL
February 21, 2018, 01:39 AM
Chaudhary
srajeevan,
Have 2 column in your data table,
1:- Year/I4
2:- year_M/I6YYM
and than apply your where condition ,
 where Year GT 2017 and year_M LT 201802 



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
February 21, 2018, 10:04 AM
srajeevan
Hi,

I have tried to create that year_M define field.But i am getting error.
  
DEFINE FILE TBL1
Defyear/YY=OFFICER_DAILY_DATE;
Defmonth1/MT=OFFICER_DAILY_DATE;
Defmonth/D2 = Defmonth1;
year_M/I6YYM=OFFICER_DAILY_DATE;


When i use that field in my report it says the field is not recognized.


WF8206,Windows 7,8,10
HTM,PDF,EXCEL
February 21, 2018, 10:26 AM
srajeevan
Hi Chaudhary..

I created year_M and it worked.
year_M/YYMD=HDATE(OFFICER_DAILY_DATE,'YYMD');
converted the date field to YYMD format coz it was in YYMDHMS format.
Then converted to year month format
yearmonth/YY|M = year_M;
  

Thanks.


WF8206,Windows 7,8,10
HTM,PDF,EXCEL