I am trying to get the days date whenever a flow is run and store that date in slots.date.
I tried this, the code was modified from a get time node.
var dateString = new Date().toLocaleTimeString([],
{
day: "2-digit",
month: "2-digit"
})
{
msg.slots.date = dateString;
}
return msg;
I get the current date but it also includes the time, which I do not want. I would like to change the format of the date from the 11/30 to Tues Nov 30.
I looked at some JS docs but everything I found was using Date() to set the date not retrieve it.