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 |
|
CSK
Constraint Violating Yak Guru
489 Posts |
Posted - 2007-11-30 : 10:26:17
|
| All,I am trying to find out the birthdate from Age,I have tried the below query, I am not geting the exact output.can any one help to find out what is wron in my query..? DECLARE @Age NUMERIC(10,4), @todaydt DATETIME SET @todaydt = GETDATE() SELECT @Age = FLOOR(DATEDIFF(dy, '11/07/1978'/*Format:DD/MM/YYYY*/, @TodayDt)/365.25) SELECT DATEADD(DAY, -1,(DATEADD(YEAR, (-1 * @Age) - 1, @TodayDt)))Thankskrishna |
|
|
jhocutt
Constraint Violating Yak Guru
385 Posts |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-12-01 : 14:57:32
|
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=74462 E 12°55'05.25"N 56°04'39.16" |
 |
|
|
|
|
|