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     [CLOSED] Update Date HTML Composer - System time

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Update Date HTML Composer - System time
 Login/Join
 
Platinum Member
posted
Hello

I have a HTML page with reports on it and there is a text box which is dynamically populated from a fex.
It shows the date/time when database is next updated. At that time, if the HTML page is refreshed, reports show updated data.

Is there a way to turn that date/time to different color or something similar, when system time passes next update date/time?
This would help user to easily notice that update data is available and he should refresh the page.

Please suggest.

Thanks..

This message has been edited. Last edited by: <Kathryn Henning>,


WF 8.2.01 APP STUDIO
PDF,HTML,EXL2K,Active
 
Posts: 139 | Registered: July 21, 2011Report This Post
Virtuoso
posted Hide Post
Process with js where you'll compare the two dates (update date vs system date) and change the color of the field accordingly.


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
Platinum Member
posted Hide Post
quote:
Originally posted by MartinY:
Process with js where you'll compare the two dates (update date vs system date) and change the color of the field accordingly.


Its not working somehow.
field in my database is HMDI format. converted to alpha and compared with system date but getting wrong result.

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


WF 8.2.01 APP STUDIO
PDF,HTML,EXL2K,Active
 
Posts: 139 | Registered: July 21, 2011Report This Post
Virtuoso
posted Hide Post
Can you share your code and show some data sample ?


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
Platinum Member
posted Hide Post
quote:
Originally posted by MartinY:
Can you share your code and show some data sample ?


Data from data base: 02/11 14:33  (HMDI FORMAT)
Converted to Alpha
TIME1/A11 =  HCNVRT(DATE_DISP, '(HMDI)', 11, 'A11');

Passed it as amper variable to HTML file

JavaScript for system date: 
var currentdate = new Date(); 
var sys_date_time = (currentdate.getMonth()+1) + "/"
                +   currentdate.getDate()  + " "
                + currentdate.getHours() + ":"  
                + currentdate.getMinutes();


if (sys_date_time < '!IBI.AMP.DATE_NEW;')
{
	alert("less values");
}
else
{
	alert("greater values");
}




WF 8.2.01 APP STUDIO
PDF,HTML,EXL2K,Active
 
Posts: 139 | Registered: July 21, 2011Report This Post
Virtuoso
posted Hide Post
Try displaying the value of your variable sys_date_time and !IBI.AMP.DATE_NEW and you'll see that sys_date_time doesn't have the leading 0 (zero).

You're comparing 2/11 15:6 with 02/11 14:33

You need the adjust your code to add the leading 0 for all part of your sys_date_time.


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
Master
posted Hide Post
BI Developer,

This is purely a JS question and your going to find better examples on JS forums. I did do a quick google search on comparing times in JS and came across this page

http://stackoverflow.com/quest...in-the-format-hhmmss

I would suggest looking into this.


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Report This Post
Platinum Member
posted Hide Post
quote:
Originally posted by MartinY:
Try displaying the value of your variable sys_date_time and !IBI.AMP.DATE_NEW and you'll see that sys_date_time doesn't have the leading 0 (zero).

You're comparing 2/11 15:6 with 02/11 14:33

You need the adjust your code to add the leading 0 for all part of your sys_date_time.


I appended 0 but I think its not correct. Its like comparing alpha values, not time values.


WF 8.2.01 APP STUDIO
PDF,HTML,EXL2K,Active
 
Posts: 139 | Registered: July 21, 2011Report This Post
Virtuoso
posted Hide Post
If above Eric solution doesn't work for you, it will look weird but you can change your alpha dates to number instead and then compare.

15/02/11 14:33 --> 1502111433
15/02/11 15:06 --> 1502111506

If 1502111506 < 1502111433 then ... else ...

But I suggest to also consider the year when comparing as number. Otherwise you will have issue.


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
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Update Date HTML Composer - System time

Copyright © 1996-2020 Information Builders