Convert Text to Date

:bullseye: What is your goal?

I´m trying to setup a simple automation with Google Sheets & Kommo. The goal is that, everytime a row is added to a spreadsheets, a task will be created in Kommo based on the info the row has (Lead ID, Task Duration, Start Time of the task, etc.)

:thinking: What is the problem?

The issue is, whenever I try to setup the date for the task in Kommo, it would not create the task because the info brought from GS is a date but in text. Where in the Kommo module I need a date data type. Also happens with duration where the info brought from the spreadsheets is text but I need a number on the Kommo module.

:test_tube: What have you tried so far?

So far. I´ve tried using the parsedate function but this doesn´t help.

:camera_with_flash: Screenshots: scenario setup, module configuration, errors

Hey there,

If parseDate didn’t help, then Kommo is not expecting a date type. Check the Kommo API documentation to see what format it’s expecting dates in and use formatDate to apply that formatting. As far as I remember, it should be a unix timestamp. You can use parseDate() first to change the value to a date, then use formatDate on top of it to change it to a unix timestamp.

Hey!

Yeah! It does expect a unix timestamp. I´ve tried this you say but still doesn´t work, it shows this error

Is there something I may be doing wrong or not taking into account?

Yeah it’s M/DD/YYYY HH:mm:ss in the screenshot.

This was iiiiiit. Thank you so much