Skip to Content
0
Sep 12, 2023 at 11:13 AM

Convert milliseconds to date in dimension property

88 Views

Hello,

I created a button in my story to publish inputed data. This button calls a script onclick. When the user clicks on button, the "User" and "Timestamp" properties are filled in Audit dimension. The data stored in the "Timestamp" property is in milliseconds.

I need to display "Timestamp" property in my story in date format with the following format: dd-MMM-yyyy HH:mm:ss

image.png

Application.showBusyIndicator("PubData");

Model1.createMembers("Audit", {

id: var_sysid,

properties: {

User: Application.getUserInfo().id,

Timestamp: Date.now().toString()

}

});

console.log(PubDataAction.getParameterValue("Audit"));

PubDataAction.setParameterValue("Audit",var_sysid);

PubDataAction.execute();

if(Table_1.getPlanning().getPublicVersion("Planning").isDirty()){

Table_1.getPlanning().getPublicVersion("Planning").publish();

}

Application.hideBusyIndicator();

Thanks

Attachments

image.png (37.5 kB)