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  iWay Software Product Forum on Focal Point    [SOLVED] How to convert A10 to YYMD?
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] How to convert A10 to YYMD?
 Login/Join
 
Gold member
posted
Hi all. I'm using release R727703B and I'm trying to convert an Academic Year in an A7 format i.e. "2004-05" to a YYMD for calculating date differences.


My thought was to do this:
EDIT(EDIT( A_PERIOD,'9999') | '/09/01'))
which creates 2004/09/01 in an A10 Format and then edits it into YYMD. Unfortunately the software doesn't like this and spits out blanks.

I then thought to do

EDIT(EDIT( F_PERIOD,'9999') | '0901') and put it into an I8YYMD format, but again, the software doesn't like this and only wants to spit out A8 format.

Any suggestions?

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


WebFocus 8.104
Windows 7 Entreprise, SP1
 
Posts: 76 | Location: Abbotsford BC | Registered: March 15, 2010Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Try this:

A_DATE/A8YYMD = EDIT(A_PERIOD,'9999$99') | '01';
S_DATE/YYMD   = A_DATE ;


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Reply With QuoteReport This Post
Gold member
posted Hide Post
quote:
Originally posted by Dan Satchell:
Try this:

A_DATE/A8YYMD = EDIT(A_PERIOD,'9999$99') | '01';
S_DATE/YYMD   = A_DATE ;


Good suggestion, I unfortunately get blanks in my S_DATE transform.


WebFocus 8.104
Windows 7 Entreprise, SP1
 
Posts: 76 | Location: Abbotsford BC | Registered: March 15, 2010Reply With QuoteReport This Post
Virtuoso
posted Hide Post
This works for me:

DEFINE FILE CAR
 A_PERIOD/A7 WITH COUNTRY = '2004-05';
 A_DATE/A8YYMD = EDIT(A_PERIOD,'9999$99') | '01';
 S_DATE/YYMD   = A_DATE ;
END
-*
TABLE FILE CAR
 PRINT A_PERIOD A_DATE S_DATE
 WHERE RECORDLIMIT EQ 1 ;
END


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Dan's suggestion should work unless there is something else there.

You could always try DATEPATTERN in the MFD.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Reply With QuoteReport This Post
Gold member
posted Hide Post
Thanks guys, this is what I needed.


WebFocus 8.104
Windows 7 Entreprise, SP1
 
Posts: 76 | Location: Abbotsford BC | Registered: March 15, 2010Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [SOLVED] How to convert A10 to YYMD?

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.