APITable Date Format problem

There is an issue with API


table integration for date format please check Screenshot by Lightshot .

That isn’t a supported date format in API Table.

[https://aitable.ai/workbench/dstZaA64qBoxebffsW/viwWn23Ryenf0/recmAC8jfSlEr](https://AiTable Roadmap)

[interface_modal.DateFormat | AITable Developer Center](https://APITable API Docs - Date Formats)

You’ll need to convert that date before pushing it to the APITable Piece.

What I did is add a new column next to the date column that I want to format. Then, in the extra column, I applied a formula to format the date as desired, which works well, particularly when you have payment transactions where the date is in Unix Timestamp.

1 Like

Hi,
I crossed the same issue and solved it using a code block. Here is the solution for reference :

Code :

export const code = async (inputs) => {
//API table provides unix date in millisecondes
// We Use the timestamp directly
const date = new Date(Number(inputs.unixTimestamp))
const formattedDate = ${date.getDate()}/${date.getMonth() + 1}/${date.getFullYear()}
return formattedDate
};

1 Like