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 |
anandbe21
Starting Member
4 Posts |
Posted - 2009-10-05 : 21:51:52
|
Hi All,i need to convert my Datevalue datatype to Varchar this is my Query here i need to modify hereselect @RemDays =datediff(dd,@dateOfReporting,'2009-08-28') from tbl_leavedetails,tbl_LeaveReporting where tbl_leavedetails.LeaveId =tbl_LeaveReporting.leaveIdset @qrystr1 ='update tbl_LeaveStatistics set AlreadyUsed = (AlreadyUsed - ''+(Convert(varchar,@RemDays,102))+'') where Flag =@flag+'set @qrystr2 ='update tbl_leavedetails set NoofDays = (NoofDays - ''+@RemDays+'') where LeaveId =''+@leaveId+'''here @RemDays value comming here is Datetime when keeping this variable value in @qrystr1,@qrystr2 here i need to Convert from Datetime value to varchar .convert function i need todo. How to append and send this variable value during cast or convert like ''+Cast(@RemDays as Datetime)+'' any help regarding thisRegardsANAND |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|