Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
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.
Hi -I have a field in the db that stores an int (1-31)...this number being the day of the month. I'm trying to have a date returned for this number...for instance: 9/21/2004. How do i combine the current month with the column and the current year?Thanks in advance,Dan
convert(varchar(6),getdate(),112) + right('0' + convert(varchar(2),@int),2)yyyymmdd can always be used as a date without convertion.With timmy's you should give a style on the datetime convert..==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy.
dcummiskey
Starting Member
26 Posts
Posted - 2004-10-05 : 19:57:56
Thanks =) sorry for the late reply...was just able to get back to this project.