datetime_format() returns incorrect time while the Date field is correct

Are you using our SaaS platform (Baserow.io) or self-hosting Baserow?

SaaS

If you are self-hosting, what version of Baserow are you running?

N/A (using on baserow.io)

What are the exact steps to reproduce this issue?

Steps to reproduce

  1. Create a new table in Baserow Cloud.

  2. Add a Date field with time enabled (timezone support enabled).

  3. Manually enter a date and time, for example:

    • 27/08/2026 10:00
  4. Add a Formula field.

  5. Use the following formula:

datetime_format(field('Début'), "DD/MM/YYYY HH:mm")
  1. Compare the value displayed in the original Début field with the value returned by the formula.

Expected result

The formula should return exactly the same date and time as the original Date field.

Example:

  • Début: 27/08/2026 10:00
  • Formula: 27/08/2026 10:00

Actual result

The date is correct, but the time is incorrect.

Example:

  • Début: 27/08/2026 10:00
  • Formula: 27/08/2026 08:08

Another example:

  • Début: 14:30
  • Formula: 12:06

Additional information

  • field('Début') returns the correct value.
  • totext(field('Début')) also returns the correct value.
  • The issue only occurs

Hey @LaMachinerie, the difference is caused by how datetime_format() handles dates with time zones. When formatting the date, it converts the value to UTC, so the time can differ from what you see in the original Date field.

Also, mm represents the month, not minutes. For minutes, use MI.

To keep the time in the desired timezone, use datetime_format_tz() and specify the timezone:

datetime_format_tz(field('Début'), "DD/MM/YYYY HH24:MI", 'Europe/Amsterdam')

This should return the same local time as the Date field.