cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

How can we send DateTime from Vuforia Studio to ThingWorx

Aditya1702
15-Moonstone

How can we send DateTime from Vuforia Studio to ThingWorx

Hello Everyone,

Good Afternoon,

 

I want to send Start Time & End Time of experience from Vuforia Studio into ThingWorx.

Can anyone guide me how can I achieve it?

 

Thanks in advance.

 

Regards,

Aditya Gupta

2 REPLIES 2

Article - "How to write data to a ThingWorx stream from Vuforia Studio": https://www.ptc.com/en/support/article/CS304458 

Hi @Aditya1702,

I want to add some further details to the  answer of @VladimirN which referes to techniques    showing how to wirte an entry to TWX log . There some addtional  taks to complete the task

- Question when you need to call that twx service and  how to prepare the time string:

-what string you will write there .e.g. the timestring

  • the generation of the time string in javascript is some think like that:
    //=================================================================================================
    $scope.getTime = function() {
    var date = new Date();
    var h = date.getHours(); // 0 - 23
    var m = date.getMinutes(); // 0 - 59
    var s = date.getSeconds(); // 0 - 59
    var session = "AM";
    if(h == 0){h = 12;}
    if(h > 12){h = h - 12;session = "PM";}
    h = (h < 10) ? "0" + h : h;
    m = (m < 10) ? "0" + m : m;
    s = (s < 10) ? "0" + s : s;
    var time = h + ":" + m + ":" + s + " " + session;
    return time;
    }​
Announcements

Top Tags