---
title: "DATE_FLOOR"
description: "The DATE_FLOOR SQL function returns the floor value of a datetime."
language: en
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/date-floor
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/date-floor
updated: 2026-10-31T00:00:00Z
license: https://documentation.invantive.eu/en/
---

## Syntax
```mermaid
%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart LR
    Start((START)) --> DATE_FLOOR[DATE_FLOOR]:::quoted
    DATE_FLOOR --> End((END))
```

## Purpose
The `DATE_FLOOR` SQL function returns the floor value of a `datetime`. 

See also [[DATE_CEIL]], [[DATE_ROUND]] and [[DATE_TRUNC]].

Parameters:
- Precision (`varchar2`): one of `millenium`, `century`, `decade`, `year`, `quarter`, `month`, `week`, `day`, `hour`, `minute`, `second`, `milliseconds` and `microseconds`. A week starts on Sunday.
- Date/time (`datetime`): the date/time to take floor of.

Returns: the floor with the defined precision of the input date/time as `datetime`. The original value is returned when an unlisted precision is specified.

## Examples
The following example retrieves the floor value of the system time using millennium precision:
```sql
select date_floor('millenium', sysdateutc)

-------------------
01-01-2000 00:00:00
```
The following example retrieves the floor value of the system time using month precision:
```sql
select date_floor('month', to_date('19870315', 'YYYYMMDD'))

-------------------
01-03-1987 00:00:00
```
The following example retrieves the floor value of Thursday 1 October 2026 on week basis; a week starts on Sunday:
```sql
select date_floor('week', to_date('20261001', 'YYYYMMDD'))

-------------------
27-09-2026 00:00:00
```