Skip to content

Latest commit

 

History

History
124 lines (97 loc) · 4.37 KB

File metadata and controls

124 lines (97 loc) · 4.37 KB
title CURRENT_DATE (Transact-SQL)
description CURRENT_DATE returns the current database system date as a date value, without the database time and time zone offset.
author PratimDasgupta
ms.author prdasgu
ms.reviewer randolphwest
ms.date 08/25/2025
ms.service sql
ms.subservice t-sql
ms.topic reference
ms.custom
ignite-2025
f1_keywords
CURRENT_DATE
CURRENT_DATE_TSQL
helpviewer_keywords
dates [SQL Server], functions
niladic functions
current date and time [SQL Server]
time [SQL Server], current
date and time [SQL Server], CURRENT_DATE
functions [SQL Server], time
system date and time [SQL Server]
system date [SQL Server]
functions [SQL Server], date and time
time [SQL Server], functions
dates [SQL Server], current date and time
dates [SQL Server], system date and time
CURRENT_DATE function [SQL Server]
time [SQL Server], system
dev_langs
TSQL
monikerRange >=sql-server-ver17 || >=sql-server-linux-ver17 || >=aps-pdw-2016 || =azuresqldb-current || =azuresqldb-mi-current || =fabric-sqldb

CURRENT_DATE (Transact-SQL)

[!INCLUDE sqlserver2025-asdb-asmi-fabricsqldb]

This function returns the current database system date as a date value, without the database time and time zone offset. CURRENT_DATE derives this value from the underlying operating system on the [!INCLUDE ssde-md] runs.

Note

SYSDATETIME and SYSUTCDATE have more precision, as measured by fractional seconds precision, than GETDATE and GETUTCDATE. The SYSDATETIMEOFFSET function includes the system time zone offset. You can assign SYSDATETIME, SYSUTCDATETIME, and SYSDATETIMEOFFSET to a variable of any of the date and time types.

This function is the ANSI SQL equivalent to CAST(GETDATE() AS DATE). For more information, see GETDATE.

See Date and time data types and functions for an overview of all the [!INCLUDE tsql] date and time data types and functions.

:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions

Syntax

CURRENT_DATE

Arguments

This function takes no arguments.

Return types

date

Remarks

[!INCLUDE tsql] statements can refer to CURRENT_DATE anywhere they can refer to a date expression.

CURRENT_DATE is a nondeterministic function. Views and expressions that reference this column can't be indexed.

Examples

These examples use the system functions that return current date and time values, to return the date, the time, or both. The examples return the values in series, so their fractional seconds might differ. The actual values returned reflect the actual day / time of execution.

A. Get the current system date and time

SELECT SYSDATETIME(),
       SYSDATETIMEOFFSET(),
       SYSUTCDATETIME(),
       CURRENT_TIMESTAMP,
       GETDATE(),
       GETUTCDATE(),
       CURRENT_DATE;

[!INCLUDE ssresult-md]

Data type Value
SYSDATETIME() 2024-06-26 14:04:21.6172014
SYSDATETIMEOFFSET() 2024-06-26 14:04:21.6172014 -05:00
SYSUTCDATETIME() 2024-06-26 19:04:21.6172014
CURRENT_TIMESTAMP 2024-06-26 14:04:21.617
GETDATE() 2024-06-26 14:04:21.617
GETUTCDATE() 2024-06-26 19:04:21.617
CURRENT_DATE 2024-06-26

B. Get the current system date

SELECT CONVERT (DATE, SYSDATETIME()),
       CONVERT (DATE, SYSDATETIMEOFFSET()),
       CONVERT (DATE, SYSUTCDATETIME()),
       CONVERT (DATE, CURRENT_TIMESTAMP),
       CONVERT (DATE, GETDATE()),
       CONVERT (DATE, GETUTCDATE()),
       CURRENT_DATE;

[!INCLUDE ssresult-md]

Data type Value
SYSDATETIME() 2024-06-26
SYSDATETIMEOFFSET() 2024-06-26
SYSUTCDATETIME() 2024-06-26
CURRENT_TIMESTAMP 2024-06-26
GETDATE() 2024-06-26
GETUTCDATE() 2024-06-26
CURRENT_DATE 2024-06-26

Related content