p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   SQL Server 2000 (http://p2p.wrox.com/forumdisplay.php?f=20)
-   -   please help me how to count/convert date into days. (http://p2p.wrox.com/showthread.php?t=82192)

juric.s January 11th, 2011 04:59 AM

please help me how to count/convert date into days.
 
can someone help me how to count/convert the date into days.
my problem is when it comes to year.
when the year are not the same.
can someone help me how to solve this problem

for example.

2010/12/25 - 2011/1/25 = 30days.


thanks.
juric.s

Jeff Moden January 11th, 2011 12:53 PM

SELECT DATEDIFF(dd,'2010-12-25','2011-1-25')

Your choice as to whether to add "1" to that or not.

juric.s January 21st, 2011 11:33 PM

THANKS A LOT JEFF[:)]

Jeff Moden January 22nd, 2011 01:02 PM

You're very welcome. Thank you for the feedback.


All times are GMT -4. The time now is 09:29 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.