Display the employee details who joined before 5 days.

Write a query to display the employee details who joined before 5 days.

Showing Answers 1 - 18 of 18 Answers

Muhammad Faizan

  • Jul 7th, 2015
 

You can use a dateadd() function if you are talking about SQL Server query. In order to get the results from 5 days before the given date.

  Was this answer useful?  Yes

girisha

  • Aug 6th, 2015
 

Code
  1. SELECT * FROM emp WHERE DateDiff(dd,getdate(),hiredate) >5

  Was this answer useful?  Yes

farhan

  • Oct 15th, 2015
 

Code
  1. SELECT * FROM emp WHERE DateDiff(dd,getdate(),hiredate) >5

  Was this answer useful?  Yes

smangat

  • Dec 2nd, 2015
 

Code
  1. SELECT * FROM emp WHERE DateDiff(dd,getdate(),hiredate) >5

  Was this answer useful?  Yes

Muneeb

  • Jan 11th, 2016
 

Code
  1. SELECT * FROM emp WHERE DateDiff(dd,getdate(),hiredate) >5

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions