SQL Flow Field Guide

DAY

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

date/time arithmetic, parts, construction or truncation

What changes

Input
date/time arguments
Output or change
date/time or integer value
Return type
int

Syntax at a glance

DAY ( date )

Work example

Read the day of month for a display or calendar calculation.

Use the full date value for joins and filters rather than joining on day number alone.

Check your work DAY returns an integer from the date part and does not identify a unique date.

Practice SQL

Open in SQL Flow
SELECT DAY(CONVERT(date, '2026-04-05')) AS day_number;

Open Microsoft Learn for full syntax, permissions, and details for your version.