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     [SOLVED] Convert alpha date and time fields for date subtraction

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Convert alpha date and time fields for date subtraction
 Login/Join
 
Master
posted
In my master file I have a date field (Recdate) stored as an A6. Recdate: 800801

And there is a time field (Rectime) stored as an A4 Rectime: 0314

In a define I have converted the Recdate field to a I6YMD field and used DATECVT to arrive at the full year w slashes.

quote:

DEFINE FILE MMEXT
IDATE/I6YMD WITH WO = EDIT(RECDATE);
ITIME/I6 WITH WO = EDIT(RECTIME);
DATE2/YYMD = DATECVT(IDATE,'I6YMD','YYMD');
DATE3/A8YYMD = DATE2;
ATDT/A14 = RECDATE || (' ' | RECTIME);
ATDTA/A14 = DATE3 || (' ' | RECTIME);
END


I am trying to concat the recdate and rectime fields together into one variable to subtract it from another date/time field.

I have been away from WF for some time and I am trying to get up to speed without much grief from the alpha date / smart date grind.

Can anyone give me some pointers?

Thanks!

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


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
 
Posts: 573 | Location: Baltimore, MD | Registered: July 06, 2006Report This Post
Expert
posted Hide Post
Hi Tom,

Glad to see this issue is resolved, would you mind to share your solution please? Thanks in advance.

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
 
Posts: 1948 | Location: New York | Registered: November 16, 2004Report This Post
Master
posted Hide Post
Here's one solution.
DEFINE FILE MACGYVER
  ADATE/A6YMD='800801';
  ADATE2/A8YYMD=DATECVT(ADATE,'A6YMD','A8YYMD');
  ATIME/A4='0314';
  ADTTM/A12=ADATE2 | ATIME;
  HDATE/HYYMDS=HINPUT(12,ADTTM,8,'HYYMDS');
END
TABLE FILE MACGYVER
PRINT HDATE
IF COUNTER EQ 1
END


produces: 1980/08/01 03:14:00


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report 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     [SOLVED] Convert alpha date and time fields for date subtraction

Copyright © 1996-2020 Information Builders