Help

Re: Input.fileAsync force change ID to Date

Solved
Jump to Solution
2731 0
cancel
Showing results for 
Search instead for 
Did you mean: 
111257
6 - Interface Innovator
6 - Interface Innovator

Input.fileAsync force change ID to Date.

//read csv
let latestStock = await input.fileAsync('Please CSV',
    {
        allowedFileTypes: ['.csv'],
    }
);

console.log(latestStock);

image
↑It’s true ID"0002-3". But Date format.

If Do you know resolve. Please teach me.

11 Replies 11

Thank you so much :star_struck:
I got original ID in your way.

but My ID has additional " in each value.
How can I remove additional " ?

I think conect replace. but I couldn’t by my skill :sweat_drops:

image

This is csv text date.
image

And I have another problem.
image
Columun B Value has many comma, so line array length are unequal by use of line.split(",").

Open your csv file in a plain text editor and you will probably see that these extra quotes appear in the original file. CSV files often have text strings in double quotes in order to be able to include literal commas, quote marks, and other special characters in a single field.

Getting rid of the extra quotes is a matter of string manipulation. Keep in mind that some of the quotes you see are in the actual string, and other quotes are put there by Airtable to show that it is displaying a text string (versus a number or other data type).