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

Hi
juste do this

var convertDate = new Date(yourDate).valueOf();