[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [Type](https://evolu.dev/docs/api-reference/common/Type) › DateIso

```ts
const DateIso: brand("DateIso", String, (value) => {
  if (value.length !== 24) {
    return err<DateIsoError>({ type: "DateIso", value });
  }
  const parsed = globalThis.Date.parse(value);
  if (isNaN(parsed)) {
    return err<DateIsoError>({ type: "DateIso", value });
  }
  // Round-trip test: ensure the string is actually a proper ISO format
  const roundTrip = new globalThis.Date(parsed).toISOString();
  if (roundTrip !== value) {
    return err<DateIsoError>({ type: "DateIso", value });
  }
  return ok(value);
});
```

Defined in: [packages/common/src/Type.ts:1185](https://github.com/evoluhq/evolu/blob/e7144e2bbe9069362b62dec1b64a8aa922b8f1b0/packages/common/src/Type.ts#L1185)

ISO 8601 date-time string.

This [Type](https://evolu.dev/docs/api-reference/common/Type/interfaces/Type) represents a date-time string that follows the ISO 8601
format and is compatible with SQLite, which lacks a native date type and
relies on ISO 8601 strings for sorting. Enforcing a 24-character format
ensures correct lexicographic ordering.

It must be a valid JavaScript Date string that can be parsed.

Valid range: `"0000-01-01T00:00:00.000Z"` to `"9999-12-31T23:59:59.999Z"`.

### Example

```ts
const result = DateIso.from("2023-01-01T12:00:00.000Z"); // ok
const error = DateIso.from("10000-01-01T00:00:00.000Z"); // err
```