Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
Hi developers,
I'm trying to get date and time on my mashup home page. How to get the time dynamically ?
I had written a service which gives the date and time as outputs. Should i use refresh widget for this or is there any ootb services available. I wanted to refrain from using refresh widget because i believe if the service runs into an error then the server would be flooded with logs since it will be executed in regular time intervals.
I'm using TWX 8.2 version. Thanks in advance.
Regards,
Saran
Solved! Go to Solution.
No problem to do that, just use te expression widget mentioned before as the input of two ValueDisplay Widgets (one for the date an the other for the time), never format user browser DateTime at server side - server side could be on a different TimeZone than user browser ;) -
You don't need server side service for that, jus use expression widget that returns new Date() and a AutoRefresh widget that triggers the expression.
Hi @CarlesColl,
Thanks for your reply. The time and date will be represented in the mashup as shown below. If i use expression with newDate() it would give a string that should be broken down to be used, which my service is doing. So there is no ootb widgets for this purpose other than expression widget.
Regards,
Saran
The image seems to be broken.
This is how i would represent the date and time:
Date : 09/06/2018 Time : 16:51
No problem to do that, just use te expression widget mentioned before as the input of two ValueDisplay Widgets (one for the date an the other for the time), never format user browser DateTime at server side - server side could be on a different TimeZone than user browser ;) -