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     [SOLVED] convert date format from dd/mm/yy to dd-mon-yy
Go
New
Search
Notify
Tools
Reply
  
[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, 2020Reply With QuoteReport 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: 2003 | Location: Customer Support | Registered: April 12, 2005Reply With QuoteReport 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: 2365 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport 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: 5687 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport 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: 2003 | Location: Customer Support | Registered: April 12, 2005Reply With QuoteReport This Post
  Powered by Social Strata  
 

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-2018 Information Builders, leaders in enterprise business intelligence.