Click here to Skip to main content
13,193,393 members (59,892 online)
Click here to Skip to main content

Tagged as

Stats

0 views
1 bookmarked
Posted 4 Nov 2012

Date difference calculation

, 4 Nov 2012
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 4-Nov-12 23:05 Available Aarti Meswania
Updates in content. 86 changes had been made.
4 No 4-Nov-12 22:36 Available Aarti Meswania
Updates in content. 114 changes had been made.
3 No 4-Nov-12 22:11 Available Aarti Meswania
Updates in content. 102 changes had been made.
2 No 4-Nov-12 22:08 Available Aarti Meswania
Updates in content. 40 changes had been made.
1 No 4-Nov-12 21: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.

You may also be interested in...

Pro
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.171017.2 | Last Updated 5 Nov 2012
Article Copyright 2012 by Aarti Meswania
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid