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

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]Change Date format
 Login/Join
 
Guru
posted
Hi,

I need to change the format of the date-time date field.
e.g.2008/05/27 4:07:11 to 05/27/2008 4:07:11PM
The orginal field format is (HYYMDS) and I need to change it to MM/DD/YYYY HH:MM:SS(AM/PM).

Could anyone please help me on this!

Regards!
Thanks.

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


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Report This Post
Silver Member
posted Hide Post
DEFINE FILE CAR
  MYDATE/HYYMDS  WITH COUNTRY = HINPUT(20,'2014/12/22 13:35:01',10,'HYYMDS');
 MYDATE1/HYYMDSA  WITH COUNTRY = MYDATE;
END
TABLE FILE CAR
  PRINT COUNTRY MYDATE MYDATE1
 END


WebFOCUS 8.0.08 - BI Portal, Developer Studio, App Studio, Excel, PDF, Active Formats and HTML5
Windows, All Outputs
 
Posts: 40 | Registered: April 02, 2014Report This Post
Virtuoso
posted Hide Post
Shakila code must be changed a little bit to have MMDDYY instead :
DEFINE FILE CAR
  MYDATE/HYYMDS  WITH COUNTRY = HINPUT(20,'2014/12/22 13:35:01',10,'HYYMDS');
 MYDATE1/HMDYYSA  WITH COUNTRY = MYDATE;
END
TABLE FILE CAR
  PRINT COUNTRY MYDATE MYDATE1
 END


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Guru
posted Hide Post
Hi,

Thanks Shakila and Martin for the quick response and solution.
But Iam actually trying to pass my date as an amper variable inside my TABLE FILE SQLOUT and I tried passing it in this way :

TABLE FILE SQLOUT
PRINT *
COMPUTE MYDATE/HYYMDS = HINPUT(20,'&DATEPARAM',10,'HYYMDS');
END
-RUN

But for that column,Iam getting as blank output without any data.
Is there any other work around for this.Please let me know.

Thanks a lot in advance!

Regards!


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Report This Post
Guru
posted Hide Post
Hi,

I got the solution.
I used this format first:
COMPUTE ALPHA_DATE/A20 = HCNVRT(DATEPARAM, '(H17)', 17, 'A20');
COMPUTE MYDATE/HYYMDS = HINPUT(20, ALPHA_DATE, 10,'HYYMDS');

Thanks a ton both of you!

Regards!


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Report 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]Change Date format

Copyright © 1996-2020 Information Builders