0
I have an application in Vuejs and need to concatenate simple quotes in a variable that has a date like this 2017-11-09T02:00:00.000Z
.
I tried it this way and I didn’t succeed:
var novaData = "'" + data + "'"
I tried to use the same methodology on the server, but it returns me the following result:
'\'2017-11-02T02:00:00.000Z\''
And for nothing in this world I couldn’t do the replace()
of \
What I need is that after concatenating the returning string looks like this:
'2017-11-02T02:00:00.000Z'
because I need the date in this format to make queries in Mongodb.
If anyone can help me I’d appreciate it...
Can you explain the original format better? you have a string or an object
Date
? You’re sending it from Vue to the server?– Sergio
I have an object
Date
, I apologize for expressing myself badly, and yes, I am sending from the client side to the server– LeonardoEbert
Your question is correct
Concatenar aspas SIMPLES...
or would be `Concatenate quotation marks ...? Just to make sense of the answers– user60252