Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] convert date format from dd/mm/yy to dd-mon-yy

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] convert date format from dd/mm/yy to dd-mon-yy
 Login/Join
 
Member
posted
I have a date input in Webfocus html form. The form is writing into the DB by a SQL Passthrough. The oracle default date format is DD-MON-YY (01-JAN-01). Webfocus offers a lot of date formats within the tool except the one required for me.

How do I convert from DD/MM/YY to DD-MON-YY.


Thanks

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


8206
 
Posts: 2 | Registered: April 20, 2020Report This Post
Virtuoso
posted Hide Post
WF_Noob

Here is a sample against ggsales which is YYYMD but you can see the syntax to convert...

DEFINE FILE GGSALES
ALPHA_MO/A3=
IF EDIT(DATE,'$$$$99') EQ '01' THEN 'JAN' ELSE
IF EDIT(DATE,'$$$$99') EQ '02' THEN 'FEB' ELSE
IF EDIT(DATE,'$$$$99') EQ '03' THEN 'MAR' ELSE
IF EDIT(DATE,'$$$$99') EQ '04' THEN 'APR' ELSE
IF EDIT(DATE,'$$$$99') EQ '05' THEN 'MAY' ELSE
IF EDIT(DATE,'$$$$99') EQ '06' THEN 'JUN' ELSE
IF EDIT(DATE,'$$$$99') EQ '07' THEN 'JUL' ELSE
IF EDIT(DATE,'$$$$99') EQ '08' THEN 'AUG' ELSE
IF EDIT(DATE,'$$$$99') EQ '09' THEN 'SEP' ELSE
IF EDIT(DATE,'$$$$99') EQ '10' THEN 'OCT' ELSE
IF EDIT(DATE,'$$$$99') EQ '11' THEN 'NOV' ELSE 'DEC';
ORACLE_DATE/A9=EDIT(DATE,'$$$$$$99') | '-' | ALPHA_MO | '-' | EDIT(DATE,'$$99');
END
TABLE FILE GGSALES
BY ORACLE_DATE
WHERE READLIMIT EQ 10
WHERE RECORDLIMIT EQ 10
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,
$
ENDSTYLE
END


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
Virtuoso
posted Hide Post
You will have to play around with the format because I don't know how your field are stored (displayed format is one thing, storage another), but this is a starting point
DEFINE FILE CAR
DTX /I8 = 20200705;
DT  /A8DMYY = DATECVT(DTX, 'I8YYMD', 'A8DMYY');
-* The T is to display the 3 characters month in capitals letters (t = mixed case, TR = full month name capital, tr = full month name mixed case)
DTA /D-M-YYT = DT;
END
TABLE FILE CAR
PRINT DTX
      DT
      DTA
BY COUNTRY
WHERE READLIMIT EQ 1;
END


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
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Expert
posted Hide Post
Gents,

Might I suggest that you're trying too hard Razzer

TABLE FILE GGSALES
SUM FST.DATE/D-Mt-YY
BY DATE
END


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
Tony

You are absolutely right... Thanks!


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] convert date format from dd/mm/yy to dd-mon-yy

Copyright © 1996-2020 Information Builders