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     Calendar date format

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Calendar date format
 Login/Join
 
Member
posted
fragment from my html launch page
  calendardata="0/0/-10;0/0/10" calendardatatype="1" ibiformat="YYMD"


Date picker js returns date in format 'yyyy/mm/dd'

I want date to be return in format 'yyyy mm dd'
or 'yyyy-mm-dd'

any suggestions how to make it working?


WF 7.1. Excel 2k, Excel Pivot, HTML
 
Posts: 9 | Location: Vilnius, Lithuania | Registered: August 12, 2005Report This Post
Virtuoso
posted Hide Post
Not easily. There are only a few suppoerted date formats unfortunately.

The only way is to change dyncalendar.js to create the format you want after it has created the date. Only to be attempted if you are sure of what you are doing.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Virtuoso
posted Hide Post
easiest thing to do would be to take that date and use a -SET to mask it (EDIT) into the format you need. As Alan mentions, there are only a few supported formats, so you do what you can with what you've got.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Member
posted Hide Post
thanks for answers, I managed to edit jscripts. However I had to edit two files not one:

dynCalendar.js
calendarInit.js

I also translated week days, months in native language.

However, I stick with only 1 date format (yyyy.mm.dd). It's a lot of work to do to change all formats in js files.

Now I just wonder how to put current date when page loads...


WF 7.1. Excel 2k, Excel Pivot, HTML
 
Posts: 9 | Location: Vilnius, Lithuania | Registered: August 12, 2005Report This Post
Virtuoso
posted Hide Post
Just use an onload function and populate with current date. Be careful that the format doesn't break the js, as it can easily do.

I normally allow the date input to be populated in the format I want, then reformat before dyncalendar gets it. Let dyncalendar create the date in a format it likes and then reformat it before putting it into the input box. This requires less work on the js.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Gold member
posted Hide Post
Accept the output from the calender to a variable and use a -SET with an EDIT and mask to convert to whatever you want as mentioned.
Looks like this:
-SET &DTB = EDIT(&DOB,'$$$$$99$$$') ||'-'|| EDIT(&DOB,'$$$$$$$$99')||'-'|| EDIT(&DOB,'9999$$$$$$');


WF 7703M, XP/Win7, MRE, RC, BID, PMF, HTML, PDF, Excel 2000/7/10
 
Posts: 73 | Location: NY | Registered: February 06, 2007Report This Post
Virtuoso
posted Hide Post
This also eliminates the headache with product upgrades as well. Those JS files will get overwritten when you do any client upgrade and you have to go back and check to see if your code is still valid and then put the changes back in. Kind of a pain, speaking from experience.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Virtuoso
posted Hide Post
I agree Darin. It is a pain to have to change any of the js files.

However, IF you really MUST change the js, keep the changes simple; my approach is, rather than add code directly to a js file, keep the new code separate and add only a call to the new code from the original js. In the case of dyncalendar.js that would be a call to reformat the date prior to dyncalendar doing any work, and a call to reformat after dyncalendar has done it's bit. That way any changes in the js by IB can be more easily dealt with.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report 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     Calendar date format

Copyright © 1996-2020 Information Builders