22nd Jan, 2008

SQL Server Datediff - Duration between 2 dates

Datediff is the function for you if you want to calculate different between 2 dates, and make sure you supply the unit you would like to measure :

select ‘Year’, datediff(yyyy, ‘2005-01-22 10:20:00′, ‘2008-01-22 16:20:00′)
=> 3

select ‘Month’, datediff(m, ‘2008-01-22 10:20:00′, ‘2008-12-22 16:20:00′)
=> 11

select ‘Day’, datediff(d, ‘2008-01-22 10:20:00′, ‘2008-01-29 16:20:00′)
=> 7

select ‘Hour’, datediff(hh, ‘2008-01-22 10:20:00′, ‘2008-01-22 16:20:00′)
=> 6

select ‘Minute’, datediff(mi, ‘2008-01-22 10:20:00′, ‘2008-01-22 16:20:00′)
=> 360

select ‘Second’, datediff(s, ‘2008-01-22 10:20:00′, ‘2008-01-22 10:20:30′)
=> 30

Leave a response

Your response:

Categories

http://other.balamba.net/ http://for.balamba.net/ http://from.balamba.net/ http://frozen.balamba.net/ http://metro.balamba.net/ pale lesbian black black having man man sex led photo facial nude anime teen george michael fastlove mp3 jason anderson mp3 http://gigmp3.net http://blekly.net/ http://balamba.net/ some cut mp3
every mp3 time touch we adult mature video woman xxx real r kelly sex tape gay marriage laws in europe so what miles davis mp3 http://tomymp3.com/ http://glasshok.com/ xxx nineteen lesb my home Blog hot blog escort mature in london plavi orkestar odlazim mp3 bitch bury dig ditch artica myspace.com site sonata Arsis- We Are The Nightmare(video Version 1 And 2) face pic adult adult blooper videos porn for mp4 sexy guys with abs porn junky black celebrity man screensaver sexy