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     Converting Alphanumeric Fields to Dates [SOLVED]

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Converting Alphanumeric Fields to Dates [SOLVED]
 Login/Join
 
Gold member
posted
There has been quite a bit of changes to how dates are handled. I need to know a simple way or function for converting an alpha field to a date field.

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


WebFOCUS 7.7.02
Unix
All Output
 
Posts: 70 | Registered: March 24, 2011Report This Post
Expert
posted Hide Post
What is the format of the alpha dates ?


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
Virtuoso
posted Hide Post
Well, you could start by taking a look at my favourite DATECVT function and play with it.

As Waz indicates, the "format" in which your date string is represented plays an important role into how the conversion can be done.

TABLE FILE CAR
PRINT CAR NOPRINT
COMPUTE DATE_STR/A10 = '20120214';
COMPUTE DATE_DT/YYMD = DATECVT(DATE_STR, 'A8YYMD', 'YYMD');
WHERE RECORDLIMIT EQ 1
END



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Gold member
posted Hide Post
The DATECVT function worked for me....thanks njsden. The format of the alpha date is A8 or A8MDYY (ex. '10/01/2009'). Actually, A8MDYY worked with the function.


WebFOCUS 7.7.02
Unix
All Output
 
Posts: 70 | Registered: March 24, 2011Report This Post
Expert
posted Hide Post
The other way to do this is:
TABLE FILE CAR
PRINT CAR NOPRINT
COMPUTE STR_DATE/A8MDYY = EDIT('10/01/2009','99$99$9999') ;
COMPUTE MY_DATE/MDYY  = STR_DATE ;
WHERE RECORDLIMIT EQ 1
END


The function is the simpler.


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
Virtuoso
posted Hide Post
quote:
The function is the simpler.


But you need to 2 fields ... Music



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Gold member
posted Hide Post
Thanks for this method as well. Consider this one resolved.


WebFOCUS 7.7.02
Unix
All Output
 
Posts: 70 | Registered: March 24, 2011Report This Post
Expert
posted Hide Post
2 Steps..........2 Fields

6 of one, half dozen of the other...



MCKELPA99, you can update your first post in the this thread, and add [SOLVED] to the title.


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
quote:
[SOLVED]


WebFOCUS 7.7.02
Unix
All Output
 
Posts: 70 | Registered: March 24, 2011Report This Post
Gold member
posted Hide Post
[SOLVED]


WebFOCUS 7.7.02
Unix
All Output
 
Posts: 70 | Registered: March 24, 2011Report This Post
Expert
posted Hide Post
You can edit your first post in the thread by clicking on the folder icon with the erasor, on the right hand sode of the post


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
Thanks....


WebFOCUS 7.7.02
Unix
All Output
 
Posts: 70 | Registered: March 24, 2011Report 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     Converting Alphanumeric Fields to Dates [SOLVED]

Copyright © 1996-2020 Information Builders