Focal Point
[SOLVED] Split-up Month/Year Closed Date filters

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

February 10, 2017, 05:04 PM
zcbillions
[SOLVED] Split-up Month/Year Closed Date filters
Hi all,

I'm in need of splitting the month and year in the date and have a between search clause, such as between one month and year and between another month and year. So instead of having it like I do now with all the values between 2000/01 - 2018/12 for the user to pick through in one pick list, we want to have 2000-2018 in one picklist and the a Jan-Dec for the month pick list. It will make it more user friendly. This is being done in a HTML document by the way.

So I have the date decoded. I have it in just 'year' format, 'year/month', and 'year-month-day'.

Would I go off the closed date 'year' field and create a month picklist? Not sure how the logic would be with this? I can't conceptually figure out how this would work..

Please let me know if I need to clarify any..

Thanks in advance!

This message has been edited. Last edited by: Tamra,


WebFOCUS 8
Windows, All Outputs
February 13, 2017, 04:43 AM
Frans
Best to generate a normal date of whatever the user has selected:

Something like
WHERE DATE GE &YEARFROM/&MONTHFROM/01 AND DATE LT &YEARTO/&MONTHTO/01

and use DT() if DATE is a datetime


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
February 14, 2017, 04:57 PM
Tamra
Have you found a solution to your date question?
One member has replied, does this help you out?

You can also search on Focal Point - such as Date FROM TO, Date Range etc....

There are a lot of examples of using DATES on the forum.

Date comparison

Current Month (resolved)

Date range problem...

Thank you for participating in the Focal Point Forum!
Tamra Colangelo
Focal Point Moderator
Information Builders


WebFOCUS 8x - BI Portal, Developer Studio, App Studio, Excel, PDF, Active Formats and HTML5
February 20, 2017, 02:55 PM
zcbillions
Frans, what does the /01 after the month mean?


WebFOCUS 8
Windows, All Outputs
February 20, 2017, 03:38 PM
MartinY
Add day 01 to Year and Month to create a valid date such as CCYY/MM/DD where DD = 01.

-SET &YRFR = 1996;
-SET &MTHFR = 12;
-SET &YRTO = 1997;
-SET &MTHTO = 10;

DEFINE FILE GGSALES
DTE /YYMD = DATE;
END
TABLE FILE GGSALES
SUM UNITS
BY DTE
WHERE DTE GE DT(&YRFR/&MTHFR/01) AND DTE LE DT(&YRTO/&MTHTO/01);
END

This message has been edited. Last edited by: MartinY,


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007