Tabbed CSV file upload - date issue (as string)

Hi - I am building an app where a user uploads a tabbed delimited csv file, data is parsed to a table before being inserted into the database.

The CSV file has a date that is currently read as a string and its in DDMMYYYY format.

Im struggling on how I can transform the string into a date before its inserted into the db? Any help would be very much appreciated

let records_date = moment(dateString, "DDMMYYYY");

Added this to a transformer and then updated the table source to use the transformed data. Works nicely.