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]How to change the date format from tDMYY to dd-mon-yyyy

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]How to change the date format from tDMYY to dd-mon-yyyy
 Login/Join
 
Guru
posted
Hi,

Iam selecting the date values from the calendar control option in the html composer layout ( say for eg:15 Jan, 2015 (tDMYY)) and I need to pass the date in the format of 15-jan-2015....

I tried the formats conversion but nothing is working.

Can anyone tell me how to do this.

Thanks,
IP

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


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Report This Post
Guru
posted Hide Post
Here is a very simple example


 
-SET &YY = EDIT(&BegDate1,'$$$$$$$$99');
-SET &MM = EDIT(&BegDate1,'99');
-SET &DD = EDIT(&BegDate1,'$$$99');
-SET &BegMMM = DECODE &MM ('01' 'JAN'
-                            '02' 'FEB'
-                            '03' 'MAR'
-                            '04' 'APR'
-                            '05' 'MAY'
-                            '06' 'JUN'
-                            '07' 'JUL'
-                            '08' 'AUG'
-                            '09' 'SEP'
-                            '10' 'OCT'
-                            '11' 'NOV'
-                            '12' 'DEC');
-SET &BegDate3 = &DD || '-' || &BegMMM || '-' || &YY;

 


WebFOCUS 8.1.05
 
Posts: 496 | Registered: January 04, 2008Report This Post
Virtuoso
posted Hide Post
Hi don't think that there is a direct function to accomplish this, but using Matt example, here is one that creates the format you're requesting:
-SET &DD     = EDIT(&PARMDATE,'99');
-SET &Mth    = EDIT(&PARMDATE,'$$$999');
-SET &CCYY   = EDIT(&PARMDATE,'$$$$$$$$9999');
-SET &NewMth = DECODE &Mth ('Jan' 'jan'
-                           'Feb' 'feb'
-                           'Mar' 'mar'
-                           'Apr' 'apr'
-                           'May' 'may'
-                           'Jun' 'jun'
-                           'Jul' 'jul'
-                           'Aug' 'aug'
-                           'Sep' 'sep'
-                           'Oct' 'oct'
-                           'Nov' 'nov'
-                           'Dec' 'dec');
-SET &NEWDATEFMT = &DD || '-' || &NewMth || '-' || &CCYY;
-TYPE &NEWDATEFMT


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
Platinum Member
posted Hide Post
Maybe something like this ...

-SET &CUR_DMYY = &DMYY;
-*-SET &CUR_DMYY = 01092015;
-SET &CUR_D34 = LOCASE(11, DATETRAN(DATECVT(&CUR_DMYY, 'I8DMYY', 'DMYY'), '(DMYY)', '(t-)', 'EN', 11, 'A11'), 'A11') ;
-TYPE CUR_DMYY ---- &CUR_DMYY
-TYPE CUR_D34 ----- &CUR_D34


WebFocus 8.201M, Windows, App Studio
 
Posts: 227 | Location: Lincoln Nebraska | Registered: August 12, 2008Report This Post
Guru
posted Hide Post
Hi,

Thanks a lot everyone for the solution.
I will check and let you all know whether it worked or not.

Thanks,
IP


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Report This Post
Platinum Member
posted Hide Post
FPRINT will also do the trick:

-SET &FPDATE = LOCASE(11, EDIT(FPRINT(&DMYY,'I8DMTYY','A15'),'99-$999-$9999'),'A11');   
-TYPE  &DMYY &FPDATE



In FOCUS since 1985 - WF 8.009/8.104 Win 8 Outputs: ALL of 'em! Adapters: Sql Server Teradata Oracle
 
Posts: 161 | Location: Dallas, TX | Registered: February 20, 2009Report This Post
Guru
posted Hide Post
Hi,

Thanks a lot everyone!
It worked.

Regards,
IP


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Report 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]How to change the date format from tDMYY to dd-mon-yyyy

Copyright © 1996-2020 Information Builders