Focal Point
[CLOSED] TrMYY - date Function isn't working

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/7297011995

February 21, 2011, 06:25 PM
Sanjeev
[CLOSED] TrMYY - date Function isn't working
I am working with 7.1.7 Webfocus.
I am trying to execute the below code and connect the result to Dropdown box in HTML form.

DEFINE FILE COMPPLAN
EFF_FRMT/trMYY=EFF_YM;
END
TABLE FILE COMPPLAN
BY HIGHEST EFF_FRMT
WHERE EFF_FRMT NE ' ';
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT XML
ON TABLE SET HTMLCSS ON
END

But Dropdown box has
'032011'
'022011'
which are suppose to be
'January 2011'
'February 2011'
etc

Any suggessions??

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


WebFOCUS 7.6
Windows, All Outputs
February 21, 2011, 09:31 PM
jimster06
There appear to be multiple challenges here.
First trMYY seems to be unknown; Do you mean MtrYY?
Additionally the format works on legacy dates such as A6YMD.
You may want reconsider the format of EFF_YM


jimster06
DevStu WF 7.6.11
W7
HTML, PDF, EXL2K
February 22, 2011, 03:01 AM
Alan B
Try
myyDate/MYY=EFF_YM;
showDate/A20=DATETRAN(myyDate,'(MYY)','(tr)','EN',20,'A20');



Alan.
WF 7.705/8.007
February 22, 2011, 12:26 PM
Sanjeev
That code isn't working.


WebFOCUS 7.6
Windows, All Outputs
February 22, 2011, 01:04 PM
Sanjeev
I tried even MtrYY, but isn't working.

I am not getting the result in format "January 2011".


WebFOCUS 7.6
Windows, All Outputs
February 22, 2011, 04:33 PM
Waz
Alan has the right idea.

As you are returning this to a drop down list, it would be safer to return a string instead of a date.


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!

February 23, 2011, 05:36 AM
Alan B
quote:
That code isn't working.


If you mean:
myyDate/MYY=EFF_YM;
showDate/A20=DATETRAN(myyDate,'(MYY)','(tr)','EN',20,'A20');


It is one of the few ways to achieve what you are after. It does work, I use it on various applications. Check what you are doing.


Alan.
WF 7.705/8.007
February 23, 2011, 06:38 AM
Tom Flynn
quote:
myyDate/MYY=EFF_YM;
showDate/A20=DATETRAN(myyDate,'(MYY)','(tr)','EN',20,'A20');


Works perfect, Alan.

  
APP PREPENDPATH IBISAMP
-RUN
DEFINE FILE GGSALES
MYYDATE/MYY=DATE;
SHOWDATE/A20=DATETRAN(MYYDATE,'(MYY)','(TR)','EN',20,'A20');
END
TABLE FILE GGSALES
SUM
  DST.SHOWDATE
 BY SHOWDATE NOPRINT
ON TABLE PCHOLD FORMAT XML
END
-EXIT



Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe