Jan 12, 2005 #1 richey1 Technical User Oct 5, 2004 184 GB I have two columns - Decisionday of datatype numeric and decisionmonth of dattype datetime How can i concatenate these two columns? so if decisionmonth says 01/01/05 and decisionday is 23 then Expr1 would be 23/01/05 thanks ian
I have two columns - Decisionday of datatype numeric and decisionmonth of dattype datetime How can i concatenate these two columns? so if decisionmonth says 01/01/05 and decisionday is 23 then Expr1 would be 23/01/05 thanks ian
Jan 12, 2005 #2 derren Programmer Mar 22, 2001 500 GB I am just passing through, so as a quickie, try: cast(cast(decisionmonth as varchar(4)) + cast(Decisionday as varchar(2)) + substring(cast(decisionmonth as varchar(20)),7,20) as datetime) Derren [Mediocre talent - spread really thin] Upvote 0 Downvote
I am just passing through, so as a quickie, try: cast(cast(decisionmonth as varchar(4)) + cast(Decisionday as varchar(2)) + substring(cast(decisionmonth as varchar(20)),7,20) as datetime) Derren [Mediocre talent - spread really thin]
Jan 12, 2005 1 #3 vongrunt Programmer Mar 8, 2004 4,863 HR One of many ways: Code: dateadd( dd, DecisionDay-datepart(dd, DecisionMonth), DecisionMonth ) Upvote 0 Downvote
Jan 12, 2005 #4 derren Programmer Mar 22, 2001 500 GB Oh, that's much better Derren [Mediocre talent - spread really thin] Upvote 0 Downvote