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     [CLOSED] Can I build an HYYWD field from text?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Can I build an HYYWD field from text?
 Login/Join
 
Virtuoso
posted
I have a text field with values in the form 2009-W05-01 in them, i.e., a text version of HYYWD. Is there a way to bring that into an HYYWD format field?

I tried HINPUT but it didn't produce a result:

The_Date/HYYMDs = HINPUT(10, WEEK_ATTENDED, 8, 'HYYMDs');

I get blanks, so it apparently isn't happy receiving that format as an input.

HSETPT maybe? Has anyone stumbled across this before?

This message has been edited. Last edited by: FP Mod Chuck,



 
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007Report This Post
Virtuoso
posted Hide Post
Alright, came up with this

The approach –
1. Make a date field, set to current date so you can see the parts change.
2. Set the year of the date field in The_Date_2.
3. Set the week of the date field in The_Date_3.
4. Set the weekday of the date field in The_Date_4.
5. Remove the hours, minutes and second in The_Date_5.
6. Print all of them to see each piece is functioning properly.


DEFINE FILE WEEKLY_SUMM_DETAIL
  THE_DATE_PREP/HYYMDs  = HGETC(8, 'HYYMDs');
  THE_DATE_2/HYYMDs = HSETPT(THE_DATE_PREP, 'year', EDIT(EDIT(WEEK_ATTENDED, '9999')), 8, 'HYYMDs');
  THE_DATE_3/HYYMDs = HSETPT(THE_DATE_2, 'week', EDIT(EDIT(WEEK_ATTENDED, '$$$$$$99')), 8, 'HYYMDs');
  THE_DATE_4/HYYMDs = HSETPT(THE_DATE_3, 'weekday', EDIT(EDIT(WEEK_ATTENDED, '$$$$$$$$$99')), 8, 'HYYMDs');
  THE_DATE_5/HYYMDs = HMIDNT(THE_DATE_4, 8, 'HYYMDs');
END
 
TABLE FILE WEEKLY_SUMM_DETAIL
  PRINT *
            THE_DATE
            THE_DATE_2
            THE_DATE_3
            THE_DATE_4
            THE_DATE_5
WHERE RECORDLIMIT EQ 1000
END


Not pretty, but it works. I'm guessing there's an easier way.



 
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007Report 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     [CLOSED] Can I build an HYYWD field from text?

Copyright © 1996-2020 Information Builders