CSV export date format

Hello all,

When exporting a table or view that has a date column, the resulting format is:

YYYY-MM-DD HH:MI:SS+HH:MI

Unfortunately, excel (which is the most widely used CSV viewer) cannot recognize this format. Is there an option for setting the export date format? This is particularly troubling because a) the column in the view has no time component and b) even if excel could recognize this format, I’d end up with the wrong value because of the incorrect timezone offset. (I’m in UTC-5).

There is no option to set date format for export. It will always be UTC. I have a workaround for your use case. You can create an export specific text field & use the run following script to convert date in required format before export

// Select a table
const table = await input.tableAsync('Select a table:');

// Select the source (UTC) date field
const sourceField = await input.fieldAsync('Select the UTC date field:', table);

// Select the target field to store UTC-5 string
const targetField = await input.fieldAsync('Select the target text field (UTC-5 string):', table);

output.text(`Converting values from "${sourceField.name}" (UTC) to UTC-5 and storing in "${targetField.name}"...`);

let updatedCount = 0;

// Fetch records in pages of 50
let result = await table.selectRecordsAsync({ pageSize: 50 });

while (true) {
  for (let record of result.records) {
    const dateValue = record.getCellValue(sourceField);
    if (!dateValue) continue;

    // Convert to Date object
    const utcDate = new Date(dateValue);

    // Apply UTC-5 offset (subtract 5 hours)
    const offsetDate = new Date(utcDate.getTime() - 5 * 60 * 60 * 1000);

    // Format as "YYYY-MM-DD HH:mm:ss"
    const formatted = offsetDate.toISOString().replace("T", " ").slice(0, 19);

    // Update target field
    await table.updateRecordAsync(record.id, {
      [targetField.name]: formatted,
    });

    updatedCount++;
  }

  if (!result.nextPage) break;
  result = await result.nextPage();
}

output.text(`Updated ${updatedCount} records.`);