How to pass a data type to google sheet?

Hi there,

i'm trying to pass a date to google sheet, and from there (using excel formulas MONTH and NUMWEEK) i want to extract the week and the month, due to create a weekly mean of the values.

But, unfortunately seems that in Json the date format doesn't exists. I tried with moment node, but I just modify the date format (from mm-dd-yyyy to dd/mm/yyyy), and it still return a string.

Suggestion?

Otherwise, I could find the way to extract the week from the date in node red and pass this info to google sheet.

Try to stick to ISO format date...
YYYY-MM-DD HH:MM:SS
... This avoids any confusion regarding which is month and which part is day.

That's not the problem, i'm afraid moment node will return always a string.

But i solve with the other idea: get the number of the week frm the date. I set the moment node to return date in WW format, then i change the string into a number looking at this discussion :slight_smile:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.