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] Getting TimeZone from a Date

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Getting TimeZone from a Date
 Login/Join
 
Member
posted
I am in need of getting the Timezone(AST) portion of -SET &DATEDISP = '10/08/2010 11:11:06 AST';

I am not having much luck finding on how to do this. Did I miss it in the knowledge base? I see how to use HCNVRT but I can't find how to get the TimeZone. Any ideas?

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


Jim
Prod: WebFOCUS 7.6.5 CGI - Self Service - AIX 5.2 - IBM DB2 V9
Env 3 Local: DevStudio 7.6.5 Servlet - Self Service - MS Windows XP SP2 - Output: HTML, Excel 2000 and PDF
 
Posts: 21 | Location: Minneapolis, MN | Registered: November 17, 2005Report This Post
Expert
posted Hide Post
Try this:
-SET &TZ=EDIT(&DATEDISP,'$$$$$$$$$$$$$$$$$$$$$999');

Or you can use SUBSTR.

Hopefully I didn't misunderstand your question.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Expert
posted Hide Post
Jim, if you're doing this in Dialogue Manager, you can use the EDIT or SUBSTR function to extract the 21st to the 23rd character of the date-time string.

But, I imagine your need is more complex than this, so please provide more details.

Thanks,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
Like Ginny posted, 10 minutes before me!


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
Jim,
If you need to get the time zone from a db2 datetime field (or any other dbms for that matter), then sorry, there is no part of the field that indicates a time zone. As far as I know, the only dbms that sort of supports time zones is Oracle. DB2 stores (and returns) dates in the time zone that it derives from the OS where the database resides.
From the internet I got this statement to get DB2 to print the current local time in utc format:
db2 "with t (local_time, utc_time) as ( values (current_timestamp, current_timestamp - current timezone) ) select * from t"
Maybe you can convert this to something that WebFOCUS can handle - if this is what you're looking for. If not, just ignore this post.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Expert
posted Hide Post
Another option for Dialog Manager or an alpha field is to use GETTOK with a -1 as the token number.

I think more info on the source and format of the data will help.


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
Member
posted Hide Post
Ginny
You hit it right on the head.

Thank you


Jim
Prod: WebFOCUS 7.6.5 CGI - Self Service - AIX 5.2 - IBM DB2 V9
Env 3 Local: DevStudio 7.6.5 Servlet - Self Service - MS Windows XP SP2 - Output: HTML, Excel 2000 and PDF
 
Posts: 21 | Location: Minneapolis, MN | Registered: November 17, 2005Report This Post
Platinum Member
posted Hide Post
What type of data are you querying? Does your record have any sort of physical location information you can pull? If so, then maybe you can build a work file that lists the time zones for different physical locations and do a DB_LOOKUP on that table?


WebFOCUS: 7702
O/S : Windows
Data Migrator: 7702
 
Posts: 127 | Location: San Antonio | Registered: May 29, 2009Report 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] Getting TimeZone from a Date

Copyright © 1996-2020 Information Builders