Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.
Get Data Source Time Stamp
-
Please forgive my ignorance, I tried to search the forums but I didn't find any information regarding MetaData points, I think.
I'd like to poll a data source and get the latest time stamp, so I can display it. I don't mind having to poll a particular data point from that source.
I'd like to display year, month, day, hour, minute and second, not particularly in that order.
How can I do this?
-
Hi Mihai,
For an alphanumeric meta point:
var then = new Date(p.time); return then.getFullYear() + "-" + (then.getMonth()+1) + "-" + then.getDate() + " " + then.getHours() + ":" + then.getMinutes() + ":" + then.getSeconds();This will have your hours in 24-hour time and your months as numerals. If you want to play with Date objects, you can open your developer tools (right click on a webpage, click inspect element or inspect, find the console) and run "dt = new Date()" and see what functions are available.
-
That worked great. Thanks a bunch Phil.
-
Except that I shouldn't have added 1 to then.getDate()! Whoops.
-
Ah you're right I didn't catch that. The day was off +1. Thanks!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login