What is the Biggest Limitation of ISDATE() Function? – Interview Question of the Week #137

Question: What is the Biggest Limitation of ISDATE() Function?

What is the Biggest Limitation of ISDATE() Function? - Interview Question of the Week #137 isdate

Answer: I really wish the original question was asked in this format. Instead in the last meeting, the question was actually asked was following:

Why do the first query returns 1 and second query returns 0?

Query 1:

SELECT ISDATE('6666-04-30') IsValidDate

What is the Biggest Limitation of ISDATE() Function? - Interview Question of the Week #137 isdate1

Query 2:

SELECT ISDATE('1111-04-30') IsValidDate

What is the Biggest Limitation of ISDATE() Function? - Interview Question of the Week #137 isdate2

Honestly, the reason, I do not like questions such as this because they really are just dependent on people’s knowing very special information. I rather prefer to ask question which gives more opportunity to candidate to be correct and feel more comfortable.

I personally believe there are two biggest limitations of the ISDATE () function.

Limitation 1: When we are using four digit format in yyyy format, it supports only year 1582 to 9999.

Limitation 2: Two digit years, sometimes can be confusing as it does not represent which century they represent.

If we ask candidates to answer the limitation of ISDATE () function they can for sure think of some more valid answers. Once they know the answer they can list them in the order of priority. This way they they have more chance to demonstrate their knowledge.

Meanwhile the limitation 1, listed above is the reason why Query 1 gives us correct answer and query 2 gives us incorrect answer.

Let me know what you think of this question. I would like to know your opinion in the comments section.

Reference: Pinal Dave (https://blog.sqlauthority.com)

, ,
Previous Post
How to Allow Only Alphabets in Column? – Interview Question of the Week #136
Next Post
What does Keyword STATS Indicates in Backup Scripts in SQL Server? – Interview Question of the Week #138

Related Posts

7 Comments. Leave new

Leave a Reply

Menu