-1

I have two dates, one is assign_date (date assigned) and the other one is complt_date (date completed). I have to get the number of days in between the two dates.

DATE ASSIGNED : 04-27-2012
DATE COMPLETED: 04-27-2012
THUS DAYS     : 0

NOT COMPLETED (AS OF 03-13-2013)
DATE ASSIGNED : 04-20-2012
DATE COMPLETED:
THUS DAYS     : 327
Ankur
  • 5,086
  • 19
  • 37
  • 62

1 Answers1

0

You can do this at the query level, this could be more easier.

For MySQL database there is a function called DATEDIFF:-

ex:-  SELECT DATEDIFF(complt_date,assign_date) AS DiffDate
Sharad
  • 3,562
  • 6
  • 37
  • 59