Adding a timestamp to existing Data Cloud widget

Hello,

I created a Data Cloud widget for use with Storyline and it's working great. Is there a way to add a field with a timestamp of when the user's data was sent to the widget? If so, how could I do that?

Thanks!
Lori

August 30, 2019, 10:08 am

Click for thumbs down.0Click for thumbs up.1#1

Hi Lori. Consider creating a blank text field in the data table, generating a date string with JavaScript, and saving the date as text. Here's one example of getting date/time with JS:

https://tecadmin.net/get-current-date-time-javascript/

So your code will look something like this:

var today = new Date();

var date = today.getFullYear()+'-'+(today.getMonth()+1)+'-'+today.getDate();

CloudSet('field',date);

August 30, 2019, 10:27 am

Click for thumbs down.0Click for thumbs up.0#2

Hello lsims,

You can use Date() function to create an date object with the current date. If you want to get date in specific format you might need to refer https://speedysense.com/get-current-date-time-javascript/

January 7, 2020, 1:28 am

Click for thumbs down.0Click for thumbs up.0#3

ok

January 7, 2020, 1:28 am

Click for thumbs down.0Click for thumbs up.0#4