How can there be so many wrong answers??
SYSDATETIME would just give you current time, there's no offset displayed, and CURRENT_TIMESTAMP doesn't give enough fractional seconds, so there's only one possible answer.
It doesn't matter what time zone you are actually currently in, for the purposes of this question it is implied that you are in UTC+05:30.
I thought it was a nice, simple, informative question, so thank you.
OK - I wasn't sure of the all the different formats off the top of my head (I answer QOTD without running the code to try and test my self) so took an educated but wrong guess.
I then ran the code (at 13:11 on 13th Feb) and got the following:-
SYSDATETIME ()= 2013-02-13 13:11:37.0611535
,SYSDATETIMEOFFSET ( )=2013-02-13 13:11:37.0611535 +00:00
,SYSUTCDATETIME ( ) = 2013-02-13 13:11:37.0611535
,CURRENT_TIMESTAMP= 2013-02-13 13:11:37.057
From this SYSDATETIMEOFFSET and CURRENT_TIMESTAMP can be removed as options as the format is wrong. Question though - how do you know which is the right answer when two of the answers are the same?
I may, of course, be thick, blind or just not looking hard enough.
Can someone please explain?
-------------------------------Posting Data Etiquette - Jeff Moden [/url]Smart way to ask a question
There are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. ― Carl Sagan
I would never join a club that would allow me as a member - Groucho Marx