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 Legacy Date Format

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Convert Legacy Date Format
 Login/Join
 
Member
posted
Is it possiblt to convert a date format from 02/14/2014 to 14/02/2014.

Currently I have to following set up to pick up the weekly date range:
-SET &YESTERDAY = AYMD(&YYMD, -1, 'I8YYMD');
-SET &YESDAY = EDIT(&YESTERDAY, '9999/99/99');
-SET &TODAY1_5 = AYMD(&YYMD, -7,'I8YYMD');
-SET &TODAY_5 = EDIT(&TODAY1_5, '9999/99/99');
-SET &DATE1 = (&TODAY_5 | ' 00:00:00');
-SET &DATE2 = (&YESDAY | ' 23:59:59');
-SET &REPORT_DT1 = EDIT(&DATE1, '9999999999');
-SET &REPORT_DT2 = EDIT(&DATE2, '9999999999');

I would like to change the format of &REPORT_DT1 and &REPORT_DT2 from printing as 02/14/2014 to 14/02/2014.

I used the following statement to display the range.
HEADING
"From &REPORT_DT1 to &REPORT_DT2 "

This message has been edited. Last edited by: <Kathryn Henning>,


release 7.6.4
OS: windows 7 professional
EXL2K, HTML
 
Posts: 4 | Registered: January 16, 2014Report This Post
Expert
posted Hide Post
Please look into the CHGDAT function, it is detailed in the Function Manual with other legacy date functions.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Gold member
posted Hide Post
Heres an example of how I moved my dates:

-DEFAULT &STARTDATE = 02/14/2014;

-SET &START_DATE = EDIT(&STARTDATE,'$$$999$$$$') || EDIT(&STARTDATE,'999$$$$$$$') || EDIT(&STARTDATE,'$$$$$$9999');

-TYPE &STARTDATE
-TYPE &START_DATE
-EXIT


8007
Windows 7, PDF, Excel
 
Posts: 75 | Registered: September 03, 2013Report This Post
Gold member
posted Hide Post
Here it is with your example:

 
-SET &YESTERDAY = AYMD(&YYMD, -1, 'I8YYMD');
-SET &YESDAY = EDIT(&YESTERDAY, '9999/99/99');
-SET &TODAY1_5 = AYMD(&YYMD, -7,'I8YYMD');
-SET &TODAY_5 = EDIT(&TODAY1_5, '9999/99/99');
-SET &DATE1 = (&TODAY_5 | ' 00:00:00');
-SET &DATE2 = (&YESDAY | ' 23:59:59');
-SET &REPORT_DT1 = EDIT(&DATE1, '9999999999');
-SET &REPORT_DT2 = EDIT(&DATE2, '9999999999');
-SET &NEW_DATE_1 = EDIT(&REPORT_DT1,'$$$$$$$$99/') || EDIT(&REPORT_DT1,'$$$$$999$$') || EDIT(&REPORT_DT1,'9999$$$$$$');
-SET &NEW_DATE_2 = EDIT(&REPORT_DT2,'$$$$$$$$99/') || EDIT(&REPORT_DT2,'$$$$$999$$') || EDIT(&REPORT_DT2,'9999$$$$$$');

-TYPE &YESTERDAY
-TYPE &YESDAY
-TYPE &TODAY1_5
-TYPE &TODAY_5
-TYPE &DATE1
-TYPE &DATE2
-TYPE &REPORT_DT1
-TYPE &REPORT_DT2
-TYPE &NEW_DATE_1
-TYPE &NEW_DATE_2

-EXIT
 


8007
Windows 7, PDF, Excel
 
Posts: 75 | Registered: September 03, 2013Report 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 Legacy Date Format

Copyright © 1996-2020 Information Builders