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] Conversion of Alpha to date not working

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Conversion of Alpha to date not working
 Login/Join
 
Gold member
posted
Hi Everyone,

I have Alpha numeric column with format of A8(20160501) and i am trying to convert this to Date format(YYMD) to apply filter on some other field.

I am using teh following functions but these are not working in WF8104 but it worked in 7703.

DATECVT(ATODBL(SMDATE, '8', 'I8YYMD'), 'I8YYMD', 'YYMD');

Please help to resolve the issue. Thanks!

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


WebFOCUS 8104/7703/769/764, Windows 7, Oracle 11g, DB2, QAD
 
Posts: 49 | Location: Chennai | Registered: May 20, 2008Report This Post
Master
posted Hide Post
Try this:

DATECVT('20160501','A8YYMD','YYMD')

If that works, then try:

DATECVT(SMDATE,'A8YYMD','YYMD')


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
 
Posts: 594 | Location: Michigan | Registered: September 04, 2015Report This Post
Master
posted Hide Post
quote:
DATECVT('20160501','A8YYMD','YYMD')


Returns Zero.

Are you wanting the date to be 05/01/2016?

-SET &FROM_DATE = '20160501';
-SET &DATE1 = EDIT(&FROM_DATE,'$$$$99') | '/' | EDIT(&FROM_DATE,'$$$$$$99') | '/' | EDIT(&FROM_DATE,'9999');
-TYPE FROM_DATE = >&FROM_DATE<
-TYPE DATE1 = >&DATE1<



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Virtuoso
posted Hide Post
Just change the USAGE in your mas to A8YYMD.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Master
posted Hide Post
This does not return zero for me:

DEFINE FILE CAR ADD
SMDATE/YYMD=DATECVT('20160501','A8YYMD','YYMD');
END

TABLE FILE CAR
PRINT 
     CAR.BODY.SALES
     SMDATE
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:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,
$
ENDSTYLE
END

I get:

SALES	SMDATE
0	2016/05/01
12000	2016/05/01
0	2016/05/01
43000	2016/05/01
0	2016/05/01
35030	2016/05/01
7800	2016/05/01
0	2016/05/01
4800	2016/05/01
13000	2016/05/01
12400	2016/05/01
8950	2016/05/01
8900	2016/05/01
14000	2016/05/01
15600	2016/05/01
14000	2016/05/01
18940	2016/05/01
0	2016/05/01


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
 
Posts: 594 | Location: Michigan | Registered: September 04, 2015Report This Post
Gold member
posted Hide Post
Thanks everyone! DATECVT function is working now. Thanks again


WebFOCUS 8104/7703/769/764, Windows 7, Oracle 11g, DB2, QAD
 
Posts: 49 | Location: Chennai | Registered: May 20, 2008Report This Post
Master
posted Hide Post
quote:
This does not return zero for me:


Doesn't from console. Seems to work in Defines. :/

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



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 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] Conversion of Alpha to date not working

Copyright © 1996-2020 Information Builders