Skip to main content

YESTERDAY

Returns yesterday date, same as today() - 1.

Syntax​

YESTERDAY()

Return Type​

DATE, returns date in “YYYY-MM-DD” format.

Examples​

SELECT YESTERDAY(), TODAY()-1;

┌───────────────────────────┐
│ yesterday() │ today() - 1 │
├─────────────┼─────────────┤
│ 2024-05-21 │ 2024-05-21 │
└───────────────────────────┘
Try Databend Cloud for FREE

Multimodal, object-storage-native warehouse for BI, vectors, search, and geo.

Snowflake-compatible SQL with automatic scaling.

Sign up and get $200 in credits.

Try it today