If I have a field customized to this type:
1. Date
2. Time component
3. 12 hr
and I use the key/value pair in my JSON/POST, what do I send there to get this to work?
I have this working if I send a string in the correct format, but as soon as I include "typecast": true"
it fails.
I am including "typecast":true
to get fkey lookups to work.
I have a field in a Postgres database defined as:
inserted_date TIMESTAMP NOT NULL default now()
and then I am pulling it out like this (string), to send to Airtable using the REST API (POST):
(select to_char(table_name.inserted_date, 'MM/DD/YYYY HH12:MI am')) "Inserted Date",
and it works, but as soon as I include: "typecast":true
, it fails.
If I pull out not using select to_char(...
, and just use: <table_name>.inserted_date
it fails also.
It appears I need to send a native date format, time component, but what would that be?
Having a field defined as Date, 12 hr time component, and also when using typecast
, these Strings (in the JSON) will not work, I get a failed API call - (but is valid JSON):
1. "Inserted Date": "12/20/2019 04:10"
2. "Inserted Date": "12/20/2019 04:10 pm"
3. "Inserted Date": "Fri Dec 20 2019 16:10:09 GMT-0700 (Mountain Standard Time)",
Not using a String, but the Node.js Date type that comes back from Postgres is invalid JSON, and also can not be used.
"Inserted Date": Fri Dec 20 2019 16:10:09 GMT-0700 (Mountain Standard Time),
having the field defined as Date, 12 hr component, not using typecast
, this String works:
"Inserted Date": "12/20/2019 04:10"
When typecast
is specified, what is happening when it encounters a Date/12hr field?