In my Database I hve a col name as RequirementID like 1,2...but while retrieving the data from database into gridview I want to concatenate with string and Datetime and RequirementID number
for ex:I hve column data 1,2,3....etc but I want to add like "QQ2014100001" can any one help me plz???
Guest UserPosted Oct 27, 2014, 8:21 AM
SELECT 'QQ' + cast(YEAR(GETDATE()) as varchar) + cast(MONTH(GETDATE()) as varchar) + REPLICATE('0', 4 - LEN(Id)) + cast(Id as varchar) From Tickets
Replace GETDATE() with your date column.
priya AvanigaddaPosted Oct 29, 2014, 6:27 AM
Guest UserPosted Oct 29, 2014, 5:40 AM
priya AvanigaddaPosted Oct 29, 2014, 12:27 AM
Guest UserPosted Oct 28, 2014, 9:52 AM
priya AvanigaddaPosted Oct 28, 2014, 8:55 AM
cn any one help me plllzzz???
Guest UserPosted Oct 28, 2014, 8:51 AM
priya AvanigaddaPosted Oct 28, 2014, 8:50 AM
Guest UserPosted Oct 27, 2014, 9:39 AM
priya AvanigaddaPosted Oct 27, 2014, 8:38 AM