C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Find Difference between two dates in T-SQL


Posted Date: 06 May 2008    Resource Type: Code Snippets    Category: SQL

Posted By: Binu Kumar       Member Level: Silver
Rating:     Points: 10




SET DATEFORMAT dmy
GO

SELECT DATEDIFF("d", '11-2-2007', '12-4-2007')




Responses

Author: Neelesh Parkhi    02 Jun 2008Member Level: Silver   Points : 2
for using datediff
through this function you can fine all three day,month,year for that yo have to write this sentance

select datediff(days,[column_name1],[column_name2])

for month datediff(monts,[column_name1],[column_name2])

for year datediff(year,[column_name1],[column_name2])



Author: Kamal    02 Jun 2008Member Level: Gold   Points : 2
good info.

For Get First and Last day of Week from Date


Author: Kapil Dhawan    17 Jun 2008Member Level: Gold   Points : 2
Hello
Nice piece of code
Thanks for sharing your knowledge with us.
I hope to see more good code from your side
This code is going to help lots of guys.
Ton Thanks to you
Regards,
Kapil



Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: How to get code Execution Time
Previous Resource: Get Time alone from datetime field
Return to Discussion Resource Index
Post New Resource
Category: SQL


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

doors in nj

Contact Us    Privacy Policy    Terms Of Use