Hi Guys,
I tried to save a date with time in create action but the time was not saved.
i have this json from webhook:
{
"Employee": "John Doe",
"Leave_Type": "Training",
"Pay_Request": "Unpaid",
"Start_Date": "2024-02-19 08:00",
"End_Date": "2024-02-20 21:00",
"Details": "this is a test leave"
}
and in my script:
const p_startdate = payload["Start_Date"];
const startdate = moment(p_startdate, "YYYY-MM-DD hh:mm").toDate();
const p_enddate = payload["End_Date"];
const enddate = moment(p_enddate, "YYYY-MM-DD hh:mm").toDate();
when i pass the startdate and enddate to a create block, the time was not included only the date.
then i tried to separate the time and getting error.
How can i save the date time?
Please help