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     Metadata convert from String to datetime

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Metadata convert from String to datetime
 Login/Join
 
Silver Member
posted
I have a database w/the date stored in the column in the format of 2005-03-25. However the the datatype is a varchar. I need to do calculations in the report based upon this being a date time field.

I've gone into my metadata masterfile and changed the Actual Usage to Date/time, and the Usage format to show 03/25/2005(YYMD). It shows the data the correct format on the report. 03/25/2005. But when I try to filter it by saying it equals '03/25/2005' I get no data found. what am I missing
 
Posts: 45 | Registered: March 18, 2005Report This Post
Expert
posted Hide Post
One way is to edit it into an i8yymd, first,
stripping out the '/' characters and getting it into the right order;
DEFINE atemp/A8=EDIT(INDATE,'9999) | EDIT(INDATE,'$$$$$99')|EDIT(INDATE,'$$$$$$$$99');$
DEFINE itemp/I8=EDIT(atemp);$
That ought to do it.
If not, throw in another one;
DEFINE itemp2/I8YYMD = itemp;$
then edit that into a datetime.
look at this post first

This message has been edited. Last edited by: Kerry,
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Silver Member
posted Hide Post
That would be in the actual report I would put in those defines?
 
Posts: 45 | Registered: March 18, 2005Report This Post
Gold member
posted Hide Post
Ginny, you can try both ways - putting the DEFINE's in the report, or putting them in the MASTER files.

When you put DEFINES's or Virtual Fields in the MAS files, then all report developers have access to the fields you create. When you do it at the report level, then it's limited to that procedure only.
 
Posts: 55 | Registered: May 22, 2003Report This Post
Expert
posted Hide Post
well, actually i had written it for you as tho you were going to put it in the master file; YOu can add DEFINES at the bottom of a master, and then have these virtual variables available for every program.
But as Denver say, sure you can put them live in the fex as defines, or in the master. depends on your application.
The syntax of a DEFINE is a wee bit dif for in-fex than for in-MFD. You ok with the differences?
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Master
posted Hide Post
Ginny,

Be aware that the define my not generate a where statement that is sent over to the RDBMS. To test this add these three lines and look at the SQL

SET TRACEON=STMTRACE//CLIENT
SET TRACEUSER=ON
SET XRETRIEVAL=OFF

If it has the where statement your good to go. If Not you may need to look for some other code, otherwise WebFOCUS will have to do the work.
 
Posts: 865 | Registered: May 24, 2004Report 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     Metadata convert from String to datetime

Copyright © 1996-2020 Information Builders