Can you convert an interval (timestamp) to an integer or number in Tulip?
Good suggestion! It is not currently possible to convert a value with data type “interval” to any other data type.
Hello Sathya, Wei,
I’m still loooking on how to covert timestamp to integer as I would like to make calculation (such as OEE). Did you find some workarounds ?
Nevermind Texttonumber() is working just fine !
Great to hear @pte!! That function works great for what you’re trying to achieve. Were you able to set up the triggers to calculate OEE (and others) correctly??
Yes it’s ok thanks Gio
Did you create a function for converting an interval (timestamp) to an integer or number? if not, is there any ideas how to do it. I am connected to an ERP and the value i get is an interval. So, i have to convert it to calculate production indicators.
hello @FahdERM, great question!! this can be done using the
as you can see in the demo below, the app is calculating the time from now to a User selected start time. following that, the app converts the Interval to an Integer.
trigger to store Interval:
trigger to convert Interval to Integer:
here are the app Variables:
please note that the Integer will be in seconds, and can be manipulated to be in the format you need to pass it into your ERP.
hope this helps, let us know if you have further questions.