Answer simple quiz at the end of the blog post and -
Every day one winner from India will get Joes 2 Pros Volume 3.
Every day one winner from United States will get Joes 2 Pros Volume 3.
System and Time Data Types
Keeping track of date and time data points has always been a critical part of online transactional databases. For example, each sales invoice record needs a date-time stamp, as do systems which track quotes and customer contacts regarding sales opportunities.
Think of how many times during your workday that you rely on a date-time stamp as helpful metadata to sort or locate the latest information in a report or data source. Global organizations, in particular, have a need for their in-house communication, reporting, and collaboration tools to appropriately convey accurate date and time information in order to keep every part of the organization in sync.
Recap of DateTime Functions
GETDATE( ) and SELECT SYSDATETIME( ) both return the current date and time in your time zone. However, GETDATE( ) shows fractional seconds expressed in milliseconds (.333 second), and SYSDATETIME( ) shows fractional seconds expressed in nanoseconds (.3333333 second). SYSDATETIME( ) return similar results but their precisions differ.

What time is it right now in the UK? UTC is Coordinated Universal Time, formerly known as Greenwich Mean Time (GMT). (UTC is also known by the terms zulu time, world time, and universal time.)
SELECT GETUTCDATE( ) will show the current time expressed in terms of UTC. GETUTCDATE( ) is less precise than SYSUTCDATETIME ( ). However there is a UTC function that gets down to the nanoseconds, SYSUTCDATETIME( ). When we run all 4 of these functions together We see the two top times in my local time zone (in my case the Pacific time zone) and the two bottom times in UTC.

Question 16
Which one of the following functions will return the date and time in the current time zone to a precision of milliseconds?
- GETDATE( )
- SYSDATETIME( )
- GETUTCDATE( )
- SYSUTCDATETIME( )
Rules:
Please leave your answer in comment section below with correct option, explanation and your country of resident.
Every day one winner will be announced from United States.
Every day one winner will be announced from India.
A valid answer must contain country of residence of answerer.
Please check my facebook page for winners name and correct answer.
Winner from United States will get Joes 2 Pros Volume 3.
Winner from India will get Joes 2 Pros Volume 3.
The contest is open till next blog post shows up at http://blog.sqlauthority.com which is next day GTM+2.5.
Reference: Pinal Dave (
http://blog.SQLAuthority.com
)
The following functions will return the date and time in the current time zone to a precision of milliseconds:
1. GETDATE( )
2. SYSDATETIME( )
Forgot to mention location….
The following functions will return the date and time in the current time zone to a precision of milliseconds:
1. GETDATE( )
2. SYSDATETIME( )
Option 3 and 4 are wrong answers because they will return the time in UTC format.
Thanks,
Kamlesh
Bangalore, India
Correct option is #1.
New Delhi
India
Correct answer is Option #1
1.GETDATE()
becuase option #1 GETDATE() and #2 SYSDATETIME() returns date and time value with respect to CURRENT time zone, however, option #1 returns in fractional seconds expressed in milliseconds,
option #2 returns in fractional seconds expressed in nanoseconds.
Option #3 GETUTCDATE() and #4 SYSUTCDATETIME() returns the date and time value in UTC format., so these are incorrect.
Thanks.
Country – India.
GETDATE() is the correct answer
Uday Bhoopalam
Getdate() is the correct answer it returns the date and time in our zone and the time with a milli seconds – 3position
Uday Bhoopalam
USA
Correct answer is No. 1 because GETDATE( ) return the date and time in the current time zone to a precision of milliseconds. Option No. 2 does the same but with a precision of nanoseconds, so is incorrect. Option 3 and 4 are incorrect beccause they return the date and time expressed in terms of UTC.
Rene Castro
El Salvador
Answer is GETDATE( )
For DataTime in current time zone we have these :
GETDATE( ) shows fractional seconds expressed in milliseconds (.333 second),
SYSDATETIME( ) shows fractional seconds expressed in nanoseconds
Aditi S
USA
1) GETDATE( )
Option 1) is correct because the precision is to a milliseconds
Option 2) gives the system time with more frational second precision
Other 2 funtions just show the UTC times.
Leo Pius
USA
Question 16
Ans : 1- GETDATE( )
Chennai, INDIA
Correct answer is GETDATE() (option #1) that will return current date with millisecond precision
I am from USA
As in description “However, GETDATE( ) shows fractional seconds expressed in milliseconds (.333 second), and SYSDATETIME( ) shows fractional seconds expressed in nanoseconds (.3333333 second).” So its very clear that GETDATE( ) will return seconds expressed in Millisecond.
Option 1 is the right.
Thanks…
Rajneesh Verma
(INDIA)
option 1
GETDATE() will returns seconds expressed in Millisecond. and
GETUTCDATE() will show in UTC format..
Both are correct.
Arjun
INDIA
GETDATE( ) is the correct answer
Scalable – Systems
Option 1- GETDATE( ) is correct
Noida, INDIA
Thanks,
Rahul Sharma
The correct answer is option 1 and 2 that is
1. GETDATE( )
2. SYSDATETIME( )
Mahmad Khoja
INDIA
AHMEDABAD
Correct option is 1
GetDate()
This will return the result in milliseconds
INDIA
The answer is Getdate() since it displays the current time zone’s date and time to the milliseconds grain.
Option 1 : It gives the current time zone’s date and time to the precision of milliseconds.
Option 2 : It gives the current time zone’s date and time to the precision of 100 nano seconds.
Option 3 : It gives the UTC date and time to the precision of milliseconds.
Option 4 : It gives the UTC date and time to the precision of 100 nano seconds.
Shikha Gupta
USA
Correct Answer is Option 1. GETDATE( )
Pratik Raval
India
Pingback: SQL SERVER – Win a Book a Day – Contest Rules – Day 0 of 35 Journey to SQLAuthority
GETDATE()
sddesh
USA
Correct answer is # 1.
It displays the current time zone’s date and time with respect to the milliseconds format.
Option 1 GETDATE(): It returns the current date and time in your time zone. It shows fractional seconds expressed in milliseconds (.333 second).
Option 2 SYSDATETIME(): It returns the current date and time in your time zone. But it shows fractional seconds expressed in nanoseconds (.3333333 second).
Option 3 GETUTCDATE(): It will show the current time expressed in terms of UTC. GETUTCDATE( ) is less precise than SYSUTCDATETIME ( ).
Option 4 SYSUTCDATETIME(): It will show the current time expressed in terms of UTC and it gets down to the nanoseconds.
Gopalakrishnan Arthanarisamy
Unisys, Bangalore, India
Correct answer is # 1.
It displays the current time zone’s date and time with respect to the milliseconds format.
Option 1 GETDATE(): It returns the current date and time in your time zone. It shows fractional seconds expressed in milliseconds (.333 second).
Option 2 SYSDATETIME(): It returns the current date and time in your time zone. But it shows fractional seconds expressed in nanoseconds (.3333333 second).
Option 3 GETUTCDATE(): It will show the current time expressed in terms of UTC. GETUTCDATE( ) is less precise than SYSUTCDATETIME ( ).
Option 4 SYSUTCDATETIME(): It will show the current time expressed in terms of UTC and it gets down to the nanoseconds.
Gopalakrishnan Arthanarisamy
Unisys, Bangalore, India
Correct Answer is : Option 1 GETDATE()
– GVPrabu || BANGALORE || INDIA
Correct answer is Option #1
1.GETDATE()
becuase option #1 GETDATE() and #2 SYSDATETIME() returns date and time value with respect to CURRENT time zone, however, option #1 returns in fractional seconds expressed in milliseconds,
option #2 returns in fractional seconds expressed in nanoseconds.
Option #3 GETUTCDATE() and #4 SYSUTCDATETIME() returns the date and time value in UTC format., so these are incorrect.
Correct answer is Option #1
1.GETDATE()
becuase option #1 GETDATE() and #2 SYSDATETIME() returns date and time value with respect to CURRENT time zone, however, option #1 returns in fractional seconds expressed in milliseconds,
option #2 returns in fractional seconds expressed in nanoseconds.
Option #3 GETUTCDATE() and #4 SYSUTCDATETIME() returns the date and time value in UTC format., so these are incorrect.
Cochin,INDIA
Correct option is Option #1
GETDATE( )
SYSDATETIME() returns current time zone datetime upto nanoseconds which is not required.
Option #3 GETUTCDATE() and #4 SYSUTCDATETIME() return datetime in UTC format which is also not required.
Sumit
India
option one 1. GETDATE() is the right answer
because option 2 returns value in nonoseconds
option 3 and 4 gives value in utc date time
Tej Narayan Maurya
India
Correct answer is
Option 1- GETDATE( )
City:Baroda
Country: India
Thanks,
GurjitSingh
Hi,
Option #1 GetDate() is correct. It will return in nanosecods.
Thanks
Sudhir Chawla
India
Answer is 1;
SELECT GETDATE( )
GETDATE( ) shows fractional seconds expressed in milliseconds ,
and SYSDATETIME( ) shows fractional seconds expressed in nanoseconds
GETUTCDATE( ) will show the current time expressed in terms of UTC. SYSUTCDATETIME ( ) will show curretnt time gets down to the nanoseconds.
Answer is Option -1
GETDATE() will gives the correct date and time with the precission of milliseconds.
Thanks,
Narendra (India)
Correct Answer is option 1.
getdate() returns current time zone details with milliseconds precision.
Thanks,
Fazal
Correct Answer is option 1.
getdate() returns current time zone details with milliseconds precision.
Country:India
Thanks,
Fazal
Option 1 is correct. Because
1) GETDATE() returns a DATETIME value. A DATETIME value has precision upto 3 milliseconds.
2) SYSDATETIME() returns a DATETIME2 value. which gives precision upto 100nanoseconds
Thanks
Santosh.S
Bangalore
Answer 1 is Correct
because GETDATE( ) gives fractional seconds expressed in milliseconds
and GETUTCDATE( ) will show the current time expressed in milliseconds terms of UTC
Abhishek MIshra
INDIA NOIDA
Hi,
Option #1 GetDate() is correct. It will return in milliseconds not nanoseconds.
Thanks
Sudhir Chawla
India
Hi Sir,
Option 1 is the correct answer as GETDATE() will return the date and time in the current time zone to a precision of milliseconds (.333 second).
option 2 SYSDATETIME() will return the date and time in the current time zone to a precision of nanoseconds (.3333333 second).
Option 3 GETUTCDATE() will show the current time expressed in terms of UTC to a precision of milliseconds.
Option 4 SYSUTCDATETIME() will show the current time expressed in terms of UTC to a precision of nanoseconds.
So the correct answer is Option no 1 GETDATE().
P.Anish Shenoy,
INDIA, Bangalore, Karnataka
Correct Option is 1
i.e. 1) GETDATE() which gives date and time and the precision to milliseconds.
I’m from INDIA
The Correct answer is : #1
GETDATE( )
Mohd Thoufeek
chennai-india
Correct Answer is Option 1
Explanation:
1)GETDATE() returns date time in miliseconds.
Example:
SELECT GETDATE()
Thanks
Vishal Patwardhan
Indore(India)
hello,
correct answer is option #1 i.e: getdate()
getdate(): it will return the date and time in the current time zone to a precision of milliseconds
sysdatetime(): nano seconds
azaad mohammed
from mumbai,india
The correct answer is 1.GetDate()
Correct Answer: Option 1
GETDATE() returns date time in miliseconds.
Romania
Correct answer is Option #1
1.GETDATE()
Pritesh Mehat
India
Correct answer is Option #1
1.GETDATE()
Pritesh Mehta
India
Correct Answer:
1) GETDATE()
Thanks,
Mandar
Mumbai, INDIA
Correct Answer: GetDate() option 1
Purna from INDIA
Hi Pinal,
The answer for the above question is Option 1) GETDATE( ).
Explanation:
Asked : Function will return the date and time in the current time zone to a precision of milliseconds.
Explanation : Here we need to find out Current time zone in the above article it is very beautifully explained by pinal sir that GETDATE() will return current date and time in your time zone by default your time zine is said as default time zone though GETUTCDATE( ) returns the same in milliseconds but here our requirement is current time zone, i.e our zone.
Apart from that no other option will give us that result.
Diljeet kumari
Country : India
Correct option is #1
SYSDATETIME() returns current time zone datetime upto nanoseconds which is not required.
INDIA
Correct Answer:
1. GETDATE()
GETDATE() will return current date and time in current time zone with precision of milliseconds.
Hiren Bavishi
India
Correct Answer is Option 1
Explanation: Option 3 and 4 provide date and time in Universal Time Coordinates (UTC) and option 2 provide date and time in current time zone but with precision of nanoseconds.
Option 1 provide date and time in current time zone to a precision of milliseconds.
Country – INDIA (Gujarat)
Option 1 is correct
Mangesh From India
Option 2. SYSDATETIME( ), will return the date and time in the current time zone to a precision of milliseconds.
(Sale, Nigeria)
Option 1 is correct
Country : India
option #1 GETDATE( ) is correct as it the date and time in the current time zone to a precision of milliseconds
Question No:16
Answer : GETDATE() — Option 1
Shalini Meyyappan
Chennai India.
Correct Answer is option No : 1 ) GETDATE( )
GETDATE( ) returns current time zone details with milliseconds precision.
Shekhar Gurav
Country : INDIA
The correct answer is option 1 :
1. GETDATE( )
It shows fractional seconds expressed in milliseconds.
Deepali Bhende.
Country : INDIA
Correct Option is 1
GETDATE() which gives date and time and the precision to milliseconds.
Regards
Rajesh
From India
GETDATE( ) is the correct answer
Ranjit — India,hyd
The answers is #1
USA
Mike Michalicek
(1) GETDATE( ) is the answer
Correct Answer is #1
GetDate( )
The 2nd and 4th ones return time to nanoseconds not milliseconds and the 3rd and 4th return Greenwich time not my local time.
USA
Hi Pinal,
Challenge:
Question 16
Which one of the following functions will return the date and time in the current time zone to a precision of milliseconds?
1. GETDATE( )
2. SYSDATETIME( )
3. GETUTCDATE( )
4. SYSUTCDATETIME( )
Correct Answer:
1. GETDATE( )
Explanation:
GetDate( ) will show return the current date and time in milliseconds. SysDateTime( ) will return the current date and time in nanoseconds. GetUTCDate( ) will return the Coordinated Universal Time in milliseconds.
SysUTCDateTime( ) will return the Coordinated Universal Time in nanoseconds.
Country:
United States
Thanks for the knowledge!
Regards,
Bill Pepping
Correct Answer is: 1
Explanation:
Option 3 and 4 returns the UTC Date and Time, so they are not the correct options for this question. And Option 2 returns the date and time in local time zone but precision is in nanoseconds. So the correct answer is the option 1.
Thanks,
Basavaraj
Correct Answer is: 1
Explanation:
Option 3 and 4 returns the UTC Date and Time, so they are not the correct options for this question. And Option 2 returns the date and time in local time zone but precision is in nanoseconds. So the correct answer is the option 1.
Thanks,
Basavaraj
India
Answer: 1: GetDate()
Sudeepta,
India.
The answer is option 1 GETDATE().
GETDATE() is the answer
Option number 1 is the correct answer.
GETDATE( )
Country: USA
The correct answer is GETDATE( )
Varinder Sandhu (India)
Which one of the following functions will return the date and time in the current time zone to a precision of milliseconds?
GETDATE( )
SYSDATETIME( )
GETUTCDATE( )
SYSUTCDATETIME( )
Solution:
The right answer is Getdate().This function returns the current time zone or local date and time to the precision of milliseconds .
1 -> This function returns the current time zone date and time to the precision of milliseconds.
2 -> This function returns the current time zone date and time to the precision of 100 nano seconds or 10-7 seconds.
3 -> This function returns the Coordinated Universal Time (UTC) date and time to the precision of milliseconds.
4 -> This function returns the Coordinated Universal Time (UTC) date and time to the precision of 100 nano seconds or 10-7 seconds.
Nagaraj Ejanthkar
USA
The correct answer is 1. GETDATE()
Brent (USA)
The answer is Option 1
getdate() , because show the time in milliseconds and my time zone.
SYSDATETIME( ) is not correct because, we need the time in milliseconds not in nanosecond – wrong answer
GETUTCDATE( ) In spite the time is in millisecond, is not local time, is a Universal Time – wrong answer
SYSUTCDATETIME( ) its UTC time in nanosecond, not local time – Wrong answer
Leonardo
Country: Chile
Answer one, GETDATE() is the correct answer.
Andrew McLean
USA
Correct Answer: Option 1 – GETDATE()
Fahad Mirza
USA
Answer: 1. GetDate() gives the date and time with millisecond precision. It returns the current date and time in YYYY-MM-DD HH:MM:SSS.MMM where MMM is the millisecond portion.
Damodaran Venkatesan
USA
correct answer 1) getDate()
krishan kumar mishra (MCA)
Java Software Developer
India
The answer is Option 1: GETDATE( )
Ramdas,NC,USA
Option 1.
1.GETDATE( )
The precision is till miliseconds
http://blog.sqlauthority.com/2010/06/10/sql-server-difference-between-getdate-and-sysdatetime/
Thanks
Shree
Bangalore India
Hi,
Correct answer is # 1.
I am from India
Hi Pinal Dave,
GetDate() is the function that will return the date and time in the current time zone expressed in milliseconds.
The answer is #1.
David, USA
1.GETDATE( )
Gordon Kane
Allen TX
USA
Inorder to get the desired precision, the correct answer is:
1.GETDATE( )
Country: United States
hii pinal dave,
correct answer is option #1
GetDate()
The answer for Question 16 is Option 1) GETDATE( ).
Why Explanation:
We need a Function which will return the date and time in the current time zone to a precision of milliseconds as we have seen that your time zone by is nothing but default time zone.
But GETUTCDATE( ) returns the time in milliseconds but here we need is current time zone or our zone.
Hence the correct Option is Option 1 .
Why Other Answers are wrong:
Option 2) SYSDATETIME( ) will return the time in nanoseconds but we need time in millisconds so invalid answer.
Option 3) GETUTCDATE( ) and Option 4) SYSUTCDATETIME( ) will return UTC time which is not required hence ruled out.
DILIP KUMAR JENA
Country : INDIA
Answer is :
1.GETDATE( )
Vinay
Pune,India
1. getDate()
Rishi Divecha
Iselin, NJ
USA
Select Getdate()
to the precision of milliseconds
USA
the correct answer is answer 1:
ie. Select Getdate()
because
GETDATE( ) shows fractional seconds expressed in milliseconds
india
Correct Answer Option No. 1
GETDATE() Shows current date with miliseconds
Somnath Desai
India
GETDATE( ) is the correct answer
Q 16) SQL SERVER – Tips from the SQL Joes 2 Pros Development Series – System and Time Data Types – Day 16 of 35
A.) A
Winner from USA: Shikha Gupta
Winner from India: Rajneesh Verma
I thank you all for participating here. The permanent record of this update is posted on facebook page.
GETDATE() ..
Option 1 is correct Answer
Which one of the following functions will return the date and time in the current time zone to a precision of milliseconds?
1. GETDATE()
Hi Pinal,
The correct answer is option 1 GETDATE()
Ques:-Which option of the following functions will return the date and time in the current time zone to a precision of milliseconds?
Explanation:- As GETDATE( ) returns current date and time where in the time is having hour,minutes and fractional seconds expressed in milliseconds.
Thanks,
Manik Dey
India
Option 1
GETDATE()
Country : India
Pingback: SQL SERVER – SSQL Architecture Basics – Core Architecture Concepts – Book Available for SQL Server Certification Journey to SQLAuthority
Correct Answer is Option I & II
Ahmedabad,India
I think the correct answer is both No. 1 because GETDATE( ) return the date and time in the current time zone to a precision of milliseconds and No. 2 becauseSysDateTime does the same thing but with higher precision. Both are accurate to the millisecond.
Pingback: SQL SERVER – Clustered Index and Primary Key – Contest Win Joes 2 Pros Combo (USD 198) – Day 3 of 5 « SQL Server Journey with SQL Authority