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     [CLOSED] Can you sort across by date?
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] Can you sort across by date?
 Login/Join
 
Member
posted
I'm using the following line:

ACROSS STATUS_CHANGE_DATE_MODIFIED AS 'Month'

Giving me the below output:

Month
01-2019 02-2019 03-2019 12-2018

I'd like 12-2018 to be left most and then continue chronologically.

My STATUS_CHANGE_DATE_MODIFIED is determined using SQL like so:

to_char(stat.status_change_date, 'MM-YYYY') status_change_date_modified,

Any help would be greatly appreciated! Thanks!

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


intsoccersuperstar
WebFOCUS 8105m
Windows, Excel
 
Posts: 16 | Registered: October 17, 2018Reply With QuoteReport This Post
Virtuoso
posted Hide Post
It seems that STATUS_CHANGE_DATE_MODIFIED is not a date but a char due to : to_char(stat.status_change_date, 'MM-YYYY'), reason why 01-2019 is ordered before 12-2018
If it was a date 12-2018 was placed before 01-2019

You should better keep the date as a date and use IB format to have the date displayed as MM-YYYY

something such as
DEFINE FILE GGSALES
DATEMMYYYY /MYY = DATE;
END
TABLE FILE GGSALES
SUM DOLLARS
BY DATEMMYYYY
END

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


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2225 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Expert
posted Hide Post
Add another SQL column and use as your sort:
to_char(stat.status_change_date, 'YYYY-MM') status_change_date_sort

In your ACROSS:
ACROSS STATUS_CHANGE_DATE_SORT NOPRINT
ACROSS STATUS_CHANGE_DATE_MODIFIED AS 'Month'


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1958 | Location: Centennial, CO | Registered: January 31, 2006Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Can you sort across by date?

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