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.

New TIBCO Community Coming Soon
In early summer, TIBCO plans to launch a new community—with a new user experience, enhanced search, and expanded capabilities for member engagement with answers and discussions! In advance of that, the current myibi community will be retired on April 30. We will continue to provide updates here on both the retirement of myibi and the new community launch.

What You Need to Know about Our New Community
We value the wealth of knowledge and engagement shared by community members and hope the new community will continue cultivating networking, knowledge sharing, and discussion.

During the transition period, from April 20th until the new community is launched this summer, myibi users should access the TIBCO WebFOCUS page to engage.


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: 2410 | 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