Jun 27, 2023 03:20 AM
Hi,
I use n8n to do some automated data collection that i want to store in the Aritable.
I get the current date in the n8n with the code
var data = DateTime.now().toFormat('dd/M/yyyy');
return {
json: {Date: data}
}
the output is
[
{
"Date":
"27/6/2023"
}
]
The format seems to be valid, due to the airtable date documentation
As the next step, i add some extra data and append it to the table, i get the error
Cannot parse date value "27/6/2023" for field Date
That is super confusing because the format is exactly as in the documentation:
{name: 'european', format: 'D/M/YYYY'}
Solved! Go to Solution.
Jun 27, 2023 05:08 AM - edited Jun 27, 2023 05:09 AM
This one worked fine:
var data = DateTime.now().toFormat('M/dd/yyyy');
return {
json: {Date: data}
}
The data is:
[
{
"Date":
"6/27/2023"
}
]
Still wondering why, as both formats should work fine, due to the documentation
Jun 27, 2023 03:36 AM
I've simplified the case and try to append the date only:
[
{
"Date": "27/6/2023"
}
]
Still getting the same error
ERROR: Your request is invalid or could not be processed by the service
Cannot parse date value "27/6/2023" for field Date
Jun 27, 2023 05:08 AM - edited Jun 27, 2023 05:09 AM
This one worked fine:
var data = DateTime.now().toFormat('M/dd/yyyy');
return {
json: {Date: data}
}
The data is:
[
{
"Date":
"6/27/2023"
}
]
Still wondering why, as both formats should work fine, due to the documentation