String date to date property in automation/workflow with custom code

Hello,

Here is the good solution :

exports.main = async (event, callback) => { 
const date = event.inputFields['date']; 
var sdateconvert = new Date(sdate).valueOf(); 

callback({ 
outputFields: 
{ 
sdateconvert: sdateconvert 
} 
}); 
}

You just need to convert in unix timestamp in milliseconds.

Cheers,