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] Date format

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Date format
 Login/Join
 
Gold member
posted
Hi
I am using &DATEtMDYY for current date in Report Header. It is giving Jan25,2010. But i need a format like this: 11/10/2009 11:17am. i.e Timestamp.Any help would be appreciated. HTML output,report painter,DB2 stored procedure.
thanks,
rama

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


WebFOCUS 762
Windows
To be decided(All formats)
 
Posts: 52 | Registered: November 02, 2009Report This Post
Expert
posted Hide Post
This:
-TYPE &DATEMDYY &TOD
gives you this:
01/15/2010 11.44.09

You can parse &TOD to add the am or the pm.


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
Virtuoso
posted Hide Post
You may also try:

-SET &CURRDTTM = HCNVRT(HGETC(10, 'HYYMDSA'), '(HMDYYSA)', 25, 'A25');
-TYPE &CURRDTTM


Which will give you:

01/15/2010 12:48:07PM


Neftali.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Gold member
posted Hide Post
Ginny,
That is a real and timely help. Thank you so much.
rama


WebFOCUS 762
Windows
To be decided(All formats)
 
Posts: 52 | Registered: November 02, 2009Report This Post
Gold member
posted Hide Post
Hi Neftali,
Yours is fantastic.
thanks for the help,
rama


WebFOCUS 762
Windows
To be decided(All formats)
 
Posts: 52 | Registered: November 02, 2009Report This Post
Expert
posted Hide Post
One step beyond that, add the following to get
01/19/2010  8:48am

-SET &CURRDTTM = EDIT(&CURRDTTM,'9999999999999999$$$99') ;
-SET &CURRDTTM = LOCASE(18,'&CURRDTTM.EVAL',&CURRDTTM) ;
I showed this in two steps (EDIT and LOCASE) for simplicity. Combine them as desired...




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Platinum Member
posted Hide Post
With a small modification, you will get the same effect on a single line of code by changing the code to read:

quote:
-SET &CURRDTTM = HCNVRT(HGETC(10, 'HYYMD'), '(HMDYYIa)', 25, 'A25');
-TYPE &CURRDTTM


displays as:

01/20/2010 8:20am

And for fancier kicks, another small change
quote:
-SET &CURRDTTM = HCNVRT(HGETC(10, 'HYYMD'), '(HMTDYYIa)', 25, 'A25');
-TYPE &CURRDTTM


will get you:

January 20 2010 8:24am



In FOCUS since 1985 - WF 8.009/8.104 Win 8 Outputs: ALL of 'em! Adapters: Sql Server Teradata Oracle
 
Posts: 161 | Location: Dallas, TX | Registered: February 20, 2009Report This Post
Gold member
posted Hide Post
Hi Dav smith,
Thanks for the reply. I need to display 01/20/2010 in line one and timestamp 8.24AM is on second line.i.e at two different places.How can i do it with your code.Thanks for a kind help,
rama


WebFOCUS 762
Windows
To be decided(All formats)
 
Posts: 52 | Registered: November 02, 2009Report This Post
Expert
posted Hide Post
You're kidding right? The output from Dav's suggestion is a single alphanumeric (A25) variable it should be quite easy to work out how to split it into two variables from one.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 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     [SOLVED] Date format

Copyright © 1996-2020 Information Builders