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
 Transact-SQL (2000)
 Date manipulation within sql 2000

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-06-06 : 09:22:13
slim writes "Hi,

I am trying to build a date using local variables (@xxxxx etc) but do not know how to substitute the variables in to a string
in order to create the date, for example,

declare @day numeric
declare @month numeric
declare @year numeric
declare @startdate char
@startdate = cast(datetime, '@day+/+@month+/+@year')

Any help would be much appreciated."

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-06-06 : 09:29:37
see here http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=22339


KH

Go to Top of Page
   

- Advertisement -