About 126 results
Open links in new tab
  1. How to Get Current Date and Time in SQL? - GeeksforGeeks

    Dec 16, 2024 · In this article, we will explain the three main SQL functions to fetch the current date and time: GETDATE(), CURRENT_TIMESTAMP(), and SYSDATETIME(). We will cover their syntax, use cases, and practical examples for clarity and ease of implementation.

  2. GETDATE (Transact-SQL) - SQL Server | Microsoft Learn

    Nov 22, 2024 · Transact-SQL reference for the GETDATE function, which returns the current database system time as a datetime value.

  3. database - how to get current datetime in SQL? - Stack Overflow

    Aug 5, 2009 · For SQL Server use GetDate() or current_timestamp. You can format the result with the Convert(dataType,value,format). Tag your question with the correct Database Server.

  4. SQL Server GETDATE() Function - W3Schools

    The GETDATE() function returns the current database system date and time, in a 'YYYY-MM-DD hh:mm:ss.mmm' format. Tip: Also look at the CURRENT_TIMESTAMP function. Syntax

  5. SQL Server Current Date - MSSQLTips.com

    Dec 30, 2024 · SQL Server provides several different functions that return the current date time including: GETDATE(), SYSDATETIME(), and CURRENT_TIMESTAMP. The GETDATE() and CURRENT_TIMESTAMP functions are interchangeable and return a datetime data type.

  6. SQL Server Get Current Date - SQL Server Guides

    Apr 1, 2025 · SQL Server provides several built-in functions to retrieve the current date and time. Each serves a specific purpose and has unique characteristics that make it suitable for different scenarios. The most commonly used function to retrieve the current date and time in …

  7. SQL CURRENT_TIMESTAMP: Get the Current Date and Time - SQL

    This tutorial shows you how to use the SQL CURRENT_TIMESTAMP function to get the current date and time of the database server.

  8. Understanding Current Date and Time Functions in SQL Server

    Dec 13, 2024 · Explore SQL Server functions to get the current date and time. Learn about GETDATE, SYSDATETIME, formatting techniques and handling time zones.

  9. SQL Commands to check current Date and Time (Timestamp) in SQL

    Oct 7, 2022 · This article will discuss various T-SQL current date functions, when you would use them, and how they should be used. This article explores DateTime SQL Commands (functions) for SQL Server, Azure SQL Database, Managed instance(MI), and Azure Synapse Analytics.

  10. SQL Server: Get Current Date & Time - SQL DBA Blog

    Feb 25, 2025 · Get Current Date & Time in SQL Server. The GETDATE() function returns the current date and time with millisecond precision, making it suitable for most standard applications. 2. Get High-Precision Date & Time. For applications that require more precise time tracking, SYSDATETIME() provides nanosecond-level accuracy. 3.

Refresh