Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
learntsql
524 Posts |
Posted - 2009-09-04 : 02:14:26
|
| Could u please explain following query"DATEADD(dd,DATEDIFF(dd,0,date_column),0)"ThankQ. |
|
|
rajdaksha
Aged Yak Warrior
595 Posts |
Posted - 2009-09-04 : 02:20:19
|
| HiDATEADD() Function is adds or subtracts a specified time interval from a date.DATEDIFFReturns the number of date and time boundaries crossed between two specified dates. SELECT DATEDIFF(dd,getdate()-1,getdate())SELECT DATEDIFF(dd,0,getdate())SELECT DATEADD(dd,DATEDIFF(dd,0,getdate()),0)-------------------------R... |
 |
|
|
ra.shinde
Posting Yak Master
103 Posts |
Posted - 2009-09-04 : 02:27:40
|
| DATEADD(dd,DATEDIFF(dd,0,date_column),0)This will return date in date_column with default time i.e. 12:00:00 AMRahul Shinde |
 |
|
|
Nageswar9
Aged Yak Warrior
600 Posts |
Posted - 2009-09-04 : 04:32:42
|
| Hi,select dateadd(d,datediff(d,0,getdate()),0) this will return date only, what ever datefield(8/3/2009 12:34:345 ) it returns only date . |
 |
|
|
|
|
|
|
|