About 7,080,000 results
Open links in new tab
  1. SQL Commands to check current Date and Time (Timestamp) in SQL Server

    Oct 7, 2022 · Let’s explore a few use cases of various DateTime functions in SQL Server and Azure SQL Database. The following example creates a table named [DemoSQLTable] with a few columns and their default values from the DateTime function – GETDATE(), CURRENT_TIMESTAMP, and SYSDATETIME().

  2. Getting current system time in SQL Server - Stack Overflow

    Mar 15, 2012 · How do I get current system time in SQL Server? CURRENT_TIMESTAMP is ANSI compliant and equivalent to GETDATE () Otherwise, you have a plethora of functions as mentioned in SQL Server 2008 BOL here (with link for SQL Server 2005 too). I think marc_s might have missed 1 or 2 ;-)

  3. Get the Current Time Zone of the Server in SQL Server (T-SQL)

    Feb 14, 2021 · Microsoft introduced the CURRENT_TIMEZONE() function in SQL Server 2019 for returning the time zone of the server. More specifically, this function “returns the name of the time zone observed by a server or an instance”. Here’s an example to demonstrate. Result: In this case, the time zone of my instance of SQL Server is UTC.

  4. SQL Server Date and Time Functions with Examples

    Dec 31, 2024 · Learn SQL Server date and time functions SYSDATETIME, SYSDATETIMEOFFSET, SYSUTCDATETIME, CURRENT_TIMESTAMP, GETDATE (), DATENAME, DATEPART with examples.

  5. 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.

  6. 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. Just an add on for SQLite you can also use. for the current time, current date and current timestamp. You will get the same results as for SQL. sql sqlite.

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

    Feb 25, 2025 · In this guide, I’ll demo some ways to obtain date and time values in SQL Server with an added tip on formatting the output. Hope it’s useful for you! 1. 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.

  8. SQL CURRENT_TIME Function - SQL Tutorial

    Summary: in this tutorial, you will learn how to use the SQL CURRENT_TIME function to get the current time. To get the current time of the database server, you use the CURRENT_TIME function. The following illustrates the syntax: The following statement returns the current time: Code language: SQL (Structured Query Language) (sql)

  9. Understanding Current Date and Time Functions in SQL Server

    Dec 13, 2024 · The simplest and most common way to retrieve the current date value in SQL Server is the built-in function GETDATE (). This function brings the datetime value that contains both the date and time of the computer where the SQL Server instance runs. The output format is yyyy-mm-dd hh:mm:ss. The basic syntax of the query is as follows:

  10. SQL Server Get UTC Date

    Apr 22, 2025 · SQL 2008+ AT TIME ZONE: Converts between time zones: SQL 2016+ TODATETIMEOFFSET: Converts to DATETIMEOFFSET type ... I have decided to share my expert knowledge of SQL Server. Check out all the SQL Server and related database tutorials I have shared here. Most of the readers are from countries …

  11. Some results have been removed
Refresh