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.customer,  cs.customerlast, nuinvoice = cs.invoice & " " & cs.dateshipped.tostring("MM/dd/yyyy") ?

dateshipped is datetime. I want to convert to MM/dd/yyyy
Who is Participating?
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.customer,  cs.customerlast, nuinvoice

Open in new window

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.
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.