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     Convert Date To AlphaNumeric / Convert Time To AlphaNumeric / Date Time to Date-Time

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Convert Date To AlphaNumeric / Convert Time To AlphaNumeric / Date Time to Date-Time
 Login/Join
 
Silver Member
posted
I have a DB2 file w/ two sets of Date Fields and two sets of Time Fields providing the start and stop time for a transaction.

I've spent 6 hours today searching the Forum and Help text trying to come up with a way convert those to date-time fields and determine the elapsed seconds between the time. My head hurts, so I'm asking for help

FILENAME=MNTWL101, SUFFIX=DB2     ,
 REMARKS='WOTS - Labor Tracking', $
  SEGMENT=MNTWL101, SEGTYPE=S0,
    DESCRIPTION='WOTS - Labor Tracking', $
    FIELDNAME=WLSDT, ALIAS=WLSDT, USAGE=MDY, ACTUAL=DATE,
      TITLE='Clock-In,Date', DESCRIPTION='Clock-In Date', $
    FIELDNAME=WLSTM, ALIAS=WLSTM, USAGE=HHIS, ACTUAL=HHIS,
      TITLE='Clock-In,Time', DESCRIPTION='Clock-In Time', $
    FIELDNAME=WLTDT, ALIAS=WLTDT, USAGE=MDY, ACTUAL=DATE,
      TITLE='Clock-Out,Date', DESCRIPTION='Clock-Out Date', $
    FIELDNAME=WLTTM, ALIAS=WLTTM, USAGE=HHIS, ACTUAL=HHIS,
      TITLE='Clock-Out,Time', DESCRIPTION='Clock-Out Time', $


To create a Date-Time w/ the HINPUT, I need to get the file's Dates and Times to AlphaNumeric fields.

I can get the date to be AlphaNumeric, but is there a better option?

DEFINE FILE MNTWL101
     D9DAT1/A8YYMD = WLSDT;
     D9DAT2/A10 = D9DAT1;
END


I cannot figure out a way to convert the time field to be AlphaNumeric. Please help me?

Additionally, I'd prefer to convert a Date Field (WLSDT) and Time Field (WLSTM) directly to a Date-Time field. If you can give me code to do that, I'd appreciate it.

Thanks!


Brian Bollmann
Spartan Light Metal Products
WebFocus 7.6.4 / iSeries / WebSphere
 
Posts: 34 | Registered: May 09, 2008Report This Post
Virtuoso
posted Hide Post
Do some research on HDATE and HTIME. See if that helps
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Silver Member
posted Hide Post
HDATE and HTIME go from Date-Time fields to Date or Time fields. I need to go the other direction.

Are you saying that HDATE/HTIME can go from Date Field or Time Field to Date-Time Field?


Brian Bollmann
Spartan Light Metal Products
WebFocus 7.6.4 / iSeries / WebSphere
 
Posts: 34 | Registered: May 09, 2008Report This Post
Expert
posted Hide Post
Please check the documentation.

HDTTM: Converting a Date Value to a Date-Time Value

TIMETOTS: Converting a Time to a Timestamp


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
it might be a smart idea for you to buy a nice book called "(Almost) 1001 Ways to Work with DATES in WebFOCUS" ISBN 978-0-9791722-1-2
It cost maybe 25 U$ and is worth all that dollars.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 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     Convert Date To AlphaNumeric / Convert Time To AlphaNumeric / Date Time to Date-Time

Copyright © 1996-2020 Information Builders