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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
Help with Dates
 Login/Join
 
Gold member
posted
I have a Date value stored in a String. The value is in 'DD/MM/YYYY' format.

I need to convert it into a Date format (Default WebFOCUS Date Format HYYMDS) (A17).

Can you please provide me the steps to do it. Please note that I do not want this in the DEFINE.

I have a variable and I want to hold the new value in another variable.


Web Focus 7.1.6
Hosted on Unix Box
 
Posts: 61 | Registered: August 17, 2007Report This Post
Virtuoso
posted Hide Post
Ved,

I suppose that in your second variable you want an alpha date in date-time format. Here is what you can do:
  
-SET &D1='07/05/2008';
-SET &DH=HCNVRT(HDTTM(DMY(31121900, EDIT(&D1,'99$99$9999')), 8, 'HYYMDS'), '(HYYMDS)', 20, 'A20');
-SET &DH17=HCNVRT(HDTTM(DMY(31121900, EDIT(&D1,'99$99$9999')), 8, 'HYYMDS'), '(H17)', 17, 'A17');
-TYPE &D1
-TYPE &DH
-TYPE &DH17

Or any other format you wish to have.

Explanations:
EDIT(&D1,'99$99$9999') gets rid of the slashes
DMY(31121900, EDIT(&D1,'99$99$9999')) claculates the number of days from the origin of focus dates, converting the alpha date to a DMYY format
HDTTM(DMY(31121900, EDIT(&D1,'99$99$9999')), 8, 'HYYMDS') converts the focus date to a date-time
HCNVRT converts the date-time to alpha according to the specified format in parentheses.

This message has been edited. Last edited by: Danny-SRL,


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders