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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 converting an age to a partial DOB

Author  Topic 

hwilliford
Starting Member

3 Posts

Posted - 2005-02-22 : 12:28:35
I have a numeric age in years. How can I convert it to a partial DOB in the format 00/00/yyyy using only tsql?

JimL
SQL Slinging Yak Ranger

1537 Posts

Posted - 2005-02-22 : 13:11:50
Select Dob = '00/00/' + Cast(Datepart(year,getdate()) - @Ageinyears) as Varchar(20)


Jim
Users <> Logic
Go to Top of Page
   

- Advertisement -