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.
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>,
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,
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");
}
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
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.