How to concatenate in entity to sql

How can I concatenate in entity to sql?

select id, customername, customer last from table1

From cs In ctx.tbl_1
                            Select cs.id, cs.customer,  cs.customerlast, nuinvoice = cs.invoice & " " & cs.dateshipped.tostring("MM/dd/yyyy") ?

dateshipped is datetime. I want to convert to MM/dd/yyyy
VBdotnet2005Asked:
Who is Participating?
 
louisfrCommented:
You can create an intermediate variable using the Let clause:
From cs In ctx.tbl_1
Let nuinvoice = cs.invoice & " " & cs.dateshipped.tostring("MM/dd/yyyy")
Select cs.id, cs.customer,  cs.customerlast, nuinvoice

Open in new window

0
 
louisfrCommented:
I was not sure of it when I answered, but I checked and you can directly do the concatenation.
Your code should work as is.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.