| Author: ANIL PANDEY 05 Sep 2008 | Member Level: Diamond | Rating: Points: 3 |
hi,
u can use the datediff() function to get the difrence between the 2 dates. using this function u can get the difference in the DATES, MONTH and YEAR also...
Syntax is like thus
DATEDIFF ( datepart , startdate , enddate )
USE pubs GO SELECT DATEDIFF(day, pubdate, getdate()) AS no_of_days FROM titles GO
Thanks Anil
|
| Author: MuthuKumaresan 05 Sep 2008 | Member Level: Silver | Rating: Points: 2 |
Dim d1,d2 As Date d1 = CDate(first date) d2 = CDate(second date) tbx_Nodays.Text = DateDiff(DateInterval.Day, d1, d2)
|