Click here to Skip to main content
11,417,750 members (46,361 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Date difference calculation

, 5 Nov 2012 CPOL
see below exampleselect datepart(day,'2012-01-10') as daysselect datediff(yyyy,'2012-01-10','2012-01-01') as yearsselect datediff(m,'2012-01-10','2012-01-01')-(datediff(yyyy,'2012-01-10','2012-01-01')*12) as monthspass parameter like thisselect datepart(day,@EndDate) as Daysselect...

Revisions


  

Compare Revision Minor Date Status Editor
5 - publicly available No 5-Nov-12 5:05 Available Aarti Meswania
Updates in content. 86 changes had been made.
4 No 5-Nov-12 4:36 Available Aarti Meswania
Updates in content. 114 changes had been made.
3 No 5-Nov-12 4:11 Available Aarti Meswania
Updates in content. 102 changes had been made.
2 No 5-Nov-12 4:08 Available Aarti Meswania
Updates in content. 40 changes had been made.
1 No 5-Nov-12 3:45 Available Aarti Meswania

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Aarti Meswania
Software Developer
India India
It's amazing maths of technology...
Expand knowledge by sharing it.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150427.4 | Last Updated 5 Nov 2012
Article Copyright 2012 by Aarti Meswania
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid