> ## Documentation Index
> Fetch the complete documentation index at: https://docs.adriel.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Date formats for file and database data sources

> The date formats that Google Sheets, file, and database data sources accept for their date column, and how Adriel detects them.

Some data sources don't come with a fixed date column. For those, Adriel needs to know which column holds the date and how that column writes its dates. Dashboard date ranges use this setting to filter rows. This article lists the date formats those data sources accept and explains how to read and enter them.

<Info>
  **This article applies only to the following data sources:** Google Sheets, CSV Files, Amazon S3, File from Email, File from OneDrive, File from SFTP, Google BigQuery, MySQL, Postgres, Redshift, Snowflake, and MongoDB.

  All other data sources, such as ad platforms and analytics tools, provide their own dates. They need no date format setup, and nothing on this page applies to them.
</Info>

## How the date field works

After one of these data sources is created, its date column is chosen in the data source's settings: under **Select a date dimension**, pick the column in **Dimension**. Adriel then checks that column's values and fills in **Format** automatically.

Detection succeeds only when the column's values match one of the [supported formats](#supported-date-formats) listed below. The list is strict. It is not a set of examples. A date written any other way fails, even if it looks like an ordinary date.

If a column's dates are not in a supported format, the fix is to change how the dates are written in the source data. Typing a different format string does not help. Change the column in the sheet, file, or database table to one of the supported formats, then refresh the data source.

## Reading a date format

A date format is a pattern of letters that describes how each part of a date is written. These patterns follow the [date-fns format reference](https://date-fns.org/v4.4.0/docs/format), which covers every possible token. In practice, only the tokens below appear in the supported formats.

| Token | Meaning | Example for 25 June 2026 |
| - | - | - |
| `yyyy` | Four-digit year | `2026` |
| `yy` | Two-digit year | `26` |
| `MMMM` | Full month name | `June` |
| `MMM` | Short month name | `Jun` |
| `MM` | Two-digit month | `06` |
| `M` | Month number, no leading zero | `6` |
| `dd` | Two-digit day of the month, with a leading zero for days 1-9 | `25` (5 June: `05`) |
| `d` | Day of the month, no leading zero | `25` (5 June: `5`) |
| `HH` | Hour, 24-hour clock | `14` |
| `mm` | Minutes | `30` |
| `ss` | Seconds | `00` |

Everything else in a format, such as `-`, `/`, `.`, `,`, and spaces, must appear in the data exactly as written.

<Warning>
  Tokens are case-sensitive. Capital `MM` means **month** and lowercase `mm` means **minutes**. A format written as `mm/dd/yyyy` reads the middle of `06/25/2026` as minutes instead of a month, so the dates come out wrong or fail. Always use capital `M` for months and lowercase `y` and `d` for years and days.
</Warning>

## ISO dates

ISO 8601 is an international standard for writing dates, ordered from the largest unit to the smallest: year, month, day. A plain ISO date looks like `2026-06-25`. An ISO date with a time adds a `T` followed by the time, and it can end with a time zone, for example `2026-06-25T14:30:00Z`.

ISO is the safest choice when the date format of the source data can be picked freely. The order is never ambiguous, most spreadsheet tools and databases can export it, and it is always supported.

## Unix timestamps

A Unix timestamp stores a moment in time as a single number: the time elapsed since 1 January 1970 (UTC). Two variants are supported:

* **Seconds** — usually 10 digits, for example `1782345600`.
* **Milliseconds** — usually 13 digits, for example `1782345600000`.

Both examples above represent 25 June 2026, 00:00 UTC.

## Supported date formats

The date field's values must match one of the formats below exactly, including separators and spacing. Every example shows 25 June 2026.

### Standard formats

| Format | Example |
| - | - |
| ISO | `2026-06-25` or `2026-06-25T14:30:00Z` |
| Unix timestamp (seconds) | `1782345600` |
| Unix timestamp (milliseconds) | `1782345600000` |

### Year first

| Format | Example |
| - | - |
| `yyyy.MM.dd` | `2026.06.25` |
| `yyyy.MM.dd.` | `2026.06.25.` |
| `yyyy/MM/dd` | `2026/06/25` |
| `yyyy. MM. dd` | `2026. 06. 25` |
| `yyyy. MM. dd.` | `2026. 06. 25.` |
| `yyyyMMdd` | `20260625` |
| `yyyy/dd/MM` | `2026/25/06` |
| `yyyy-dd-MM` | `2026-25-06` |

### Month first

| Format | Example |
| - | - |
| `MM-dd-yyyy` | `06-25-2026` |
| `MM-dd-yy` | `06-25-26` |
| `MM/dd/yyyy` | `06/25/2026` |
| `MM/dd/yy` | `06/25/26` |
| `M/dd/yyyy HH:mm:ss` | `6/25/2026 14:30:00` |

### Day first

| Format | Example |
| - | - |
| `dd-MM-yyyy` | `25-06-2026` |
| `dd.MM.yyyy` | `25.06.2026` |
| `dd/MM/yyyy` | `25/06/2026` |
| `dd-MM-yy` | `25-06-26` |
| `dd.MM.yy` | `25.06.26` |
| `dd/MM/yy` | `25/06/26` |

### Month names

| Format | Example |
| - | - |
| `MMM dd, yyyy` | `Jun 25, 2026` |
| `MMMM dd, yyyy` | `June 25, 2026` |
| `MMM, yyyy` | `Jun, 2026` |
| `MMMM, yyyy` | `June, 2026` |
| `d-MMM-yyyy` | `5-Jun-2026` or `25-Jun-2026` |
| `dd-MMM-yyyy` | `05-Jun-2026` or `25-Jun-2026` |

### Year and month only, or month only

| Format | Example |
| - | - |
| `yyyy-MM` | `2026-06` |
| `yyyy/MM` | `2026/06` |
| `MM` | `06` |

## Correcting a detected format

Occasionally a column matches more than one supported format, and the detected format reads the dates the wrong way. For example, `06/05/2026` fits both `MM/dd/yyyy` (5 June) and `dd/MM/yyyy` (6 May). In that case, edit **Format** under **Select a date dimension** in the data source's settings so it matches how the source data writes dates. Check that months use capital `MM` and not lowercase `mm`.

Editing the format only changes how a supported format is read. It does not make an unsupported format work. A column whose values match none of the [supported formats](#supported-date-formats) fails whatever format is entered, so the only fix is to rewrite the column in the source data. ISO (`2026-06-25`) is the safest target.

Keep every row in the date column in the same format. A single row written differently can stop the sync.

## Troubleshooting

<AccordionGroup>
  <Accordion title="The date format is not detected automatically">
    The column's values do not match any supported format. Compare a few values against the [supported formats](#supported-date-formats), including separators, spaces, and trailing periods. Then change the column in the source data to a supported format, such as ISO (`2026-06-25`), and refresh the data source.
  </Accordion>

  <Accordion title="An error says the date field cannot be parsed with the format">
    At least one value in the date column does not match the chosen format. The error names the first value that failed. Correct that value, and any others written differently, in the source data. Check that the rest of the column uses the same format.
  </Accordion>

  <Accordion title="Dates show the wrong month or the wrong day">
    Either the format uses lowercase `mm` (minutes) where it should use capital `MM` (month), or the day and month are swapped. For example, `06/05/2026` reads as 5 June with `MM/dd/yyyy` and as 6 May with `dd/MM/yyyy`. Pick the format that matches how the source data writes dates.
  </Accordion>

  <Accordion title="The dashboard date range has no effect on the data">
    No date field is set for the data source, so Adriel treats all rows as one snapshot. In the data source's settings, under **Select a date dimension**, choose the date column in **Dimension**.
  </Accordion>
</AccordionGroup>

## Related

<CardGroup cols={2}>
  <Card title="How to connect Google Sheets" href="/data-sources/g-n/google-sheets/how-to-connect">
    Connect a spreadsheet tab and choose its date column.
  </Card>

  <Card title="How to connect CSV Files" href="/data-sources/a-f/csv-files/how-to-connect">
    Upload CSV or XLSX files as a data source.
  </Card>

  <Card title="Column type mismatch" href="/troubleshooting/column-type-mismatch">
    General checks for sync failures caused by column values.
  </Card>

  <Card title="Data blending" href="/data-sources/data-integration/data-blending">
    Combine file and database data with ad platform data.
  </Card>
</CardGroup>
