Difference between the current time and UTC : DATEDIFF « Date Timezone « SQL Server / T-SQL

SQL Server / T-SQL
1. Aggregate Functions
2. Analytical Functions
3. Constraints
4. Cursor
5. Data Set
6. Data Type
7. Database
8. Date Timezone
9. Index
10. Insert Delete Update
11. Math Functions
12. Select Query
13. Sequence
14. Store Procedure Function
15. String Functions
16. Subquery
17. System
18. Table
19. Table Joins
20. Transact SQL
21. Transaction
22. Trigger
23. View
Microsoft Office Word 2007 Tutorial
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / C Sharp
C# / CSharp Tutorial
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
SQL Server / T-SQL » Date Timezone » DATEDIFF 
Difference between the current time and UTC


1> -- Difference between the current time and UTC
2>
3SELECT DATEDIFF(hour, GETDATE(), GETUTCDATE())
4> GO

-----------
          7

(rows affected)
1>
2>
           
       
Related examples in the same category
1. DATEDIFF: return the difference between two dates
2. Find the number of days between 24th March 2001 and 24th March 1964
3. DATEDIFF(yyyy, "24 March 2001","24 March 1964")
4. DATEDIFF(mi, "24 March 2001","24 March 1964")
5. DATEDIFF(wk, "24 March 2001","24 March 1964")
6. DATEDIFF(m, "24 March 2001","24 March 1964")
7. DATEDIFF(d, @thisdate, @nextmonth) 'Days between'
8. DATEDIFF(month, '9-8-1989', '10-17-1991')
9. DATEDIFF(day, '9-8-1989', '10-17-1991')
10. Difference in weeks between 7-2-1996 and 8-4-1997
11. DATEDIFF(ss, @MyBirthDate, GETDATE())
12. DATEDIFF: date difference
13. Combine DateADD and DateDIFF to get the last date of a month
14. Passing a column name to the DATEDIFF() value argument
w_w___w_.j__a___v___a__2_s__._c___o___m___ | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.