Izenda, LLC

Ad Hoc Reports & Dashboards for ASP.NET Apps

Free Trial

Izenda Reports is licensed on a "per user" or "per server" basis. Please complete this form to receive a price quote.

All fields are required.

The live demo demonstrates Izenda reports with the Northwind Sample database. To login, please register below.

All fields are required.

Please register to try Izenda reports on your data today.

All fields are required.

How do I calculate how old a date is or convert a date into a...

Expand / Collapse
 

How do I calculate how old a date is or convert a date into a number?


This can be done by creating a view and using the DATEDIFF function.  Here is a DATEDIFF code sample that will calculate the numerical difference between two dates.

SELECT DATEDIFF(day,OrderDate, GETDATE()) AS DaysOld FROM Orders




Details
Type: FAQ
Options