[BUG] Date column in the table has mixed/random values

  1. My goal:
    Display table that includes Date column with correct values

  2. Issue:
    Same record is displayed with different dates when page is reloaded

    image

  3. Steps I've taken to troubleshoot:

    1. Compared raw data and data in the table
    2. Reloaded page
    3. Tried different datasets
    4. Tried different sorting methods
  4. Additional info: (Cloud or Self-hosted, Screenshots)

    1. {{(() => {const date = new Date(calls_logs_etl.data[i].startTimestamp); return date.toISOString(); })()}}
      
    2. Pagination is off
1 Like

Hey @anni ,

I looked into your issue, and it seems the root cause is how you’re formatting the date in your transformer or dynamic field.
Right now, you’re using:

{{(() => {
  const date = new Date(calls_logs_etl.data[i].startTimestamp);
  return date.toISOString();
})()}}

This approach can cause unexpected date shifts, especially if your timestamps are not in UTC. When you call toISOString(), JavaScript converts the date to UTC, which can lead to the same record showing a different date or time after a page reload—particularly if the browser or system timezone changes.

Better Approach — Use moment.js for consistent date formatting:
Instead of using toISOString(), you can format your date with moment to keep it consistent across reloads and timezones:

{{(() => {
  const date = moment(calls_logs_etl.data[i].startTimestamp);
  return date.format("YYYY-MM-DD HH:mm:ss");
})()}}

If your backend already provides UTC timestamps and you want to display them in the user’s local time, you can explicitly convert them using:

moment.utc(calls_logs_etl.data[i].startTimestamp).local().format("YYYY-MM-DD HH:mm:ss")

Hope this helps!

4 Likes