Posts

Showing posts from 2020

show (value1,value2) in one column in sql

declare @edition varchar(100)   select @edition = STUFF((SELECT  '/' + newspaperedition FROM ADVT_REQUEST INNER JOIN  NEWBILL ON ADVT_REQUEST.RO_CODE = NEWBILL.ROCODE    INNER JOIN MRADDRESS ON NEWBILL.NP_CODE = MRADDRESS.np_code WHERE New_ROCode = '1137/13/64/2021/71753/31/3'         FOR XML PATH('')), 1, 1, '')
Solution to error - String was not recognized as a valid DateTime.                                                       or  Conversion from string "29/04/2020" to type 'Date' is not valid Save date in SQL DB Dim requestdate As String             requestdate = DateTime.ParseExact(txtfrom.Text, "dd/MM/yyyy", Nothing).ToString("yyyy/MM/dd") comm.Parameters.AddWithValue("@req_date", requestdate)