CURRENT_TIMESTAMP command in SQL Server

This article will show you in detail how to use the datetime CURRENT_TIMESTAMP processing function in SQL Server with specific syntax and examples to better visualize and capture functions.

Describe

The SQL Server CURRENT_TIMESTAMP function returns the current date and time, in the format 'yyyy-mm-dd hh: mi: ss.mmm'.

Syntax

To use the CURRENT_TIMESTAMP function in SQL Server, we use the following syntax:

 CURRENT_TIMESTAMP 

There are no parameters and arguments in the CURRENT_TIMESTAMP statement.

Note :

  1. The CURRENT_TIMESTAMP function returns the system date and time in the format 'yyyy-mm-dd hh: mi: ss.mmm'.
  2. Do not put parentheses () after CURRENT_TIMESTAMP function.
  3. See also GETDATE function.
  4. CURRENT_TIMESTAMP can be used in later versions of SQL Server: SQL Server 2017, SQL Server 2016, SQL Server 2014, SQL Server 2012, SQL Server 2008 R2, SQL Server 2008, and SQL Server 2005.

For example

Take a look and explore some examples of CURRENT_TIMESTAMP functions in SQL Server.

 SELECT CURRENT_TIMESTAMP; 
Result: '2019-02-22 15:29:59.917'

Last lesson: SUM function in SQL Server

Next article: DATEDIFF function in SQL Server

4 ★ | 2 Vote

May be interested

  • The route_ws2008 command in WindowsThe route_ws2008 command in Windows
    (applies to windows server (semi-annual channel), windows server 2016, windows server 2012 r2, windows server 2012)
  • Ntcmdprompt command in WindowsNtcmdprompt command in Windows
    (applies to windows server (semi-annual channel), windows server 2016, windows server 2012 r2, windows server 2012).
  • Nslookup command in WindowsNslookup command in Windows
    (applies to windows server (semi-annual channel), windows server 2016, windows server 2012 r2, windows server 2012).
  • The ntfrsutl command in WindowsThe ntfrsutl command in Windows
    (applies to windows server (semi-annual channel), windows server 2016, windows server 2012 r2, windows server 2012).
  • Prnqctl command in WindowsPrnqctl command in Windows
    (applies to windows server (semi-annual channel), windows server 2016, windows server 2012 r2, windows server 2012)
  • Prnport command in WindowsPrnport command in Windows
    (applies to windows server (semi-annual channel), windows server 2016, windows server 2012 r2, windows server 2012)
  • Prnmngr command in WindowsPrnmngr command in Windows
    (applies to windows server (semi-annual channel), windows server 2016, windows server 2012 r2, windows server 2012)
  • The prnjobs command in WindowsThe prnjobs command in Windows
    (applies to windows server (semi-annual channel), windows server 2016, windows server 2012 r2, windows server 2012)
  • Prndrvr command in WindowsPrndrvr command in Windows
    (applies to windows server (semi-annual channel), windows server 2016, windows server 2012 r2, windows server 2012)
  • The rpcinfo command in WindowsThe rpcinfo command in Windows
    (applies to windows server (semi-annual channel), windows server 2016, windows server 2012 r2, windows server 2012)