Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi experts,
I have a date field, I want to concat the dates into a string, each date should be in a pair of single quote.
For example, I have data like below,
data:
LOAD * Inline
[
cob_date
'12/1/2018'
'12/2/2018'
'12/3/2018'
'12/4/2018'
]
the string I want is
'12/1/2018','12/2/2018','12/3/2018','12/4/2018'
I defined a variable like this:
vCon_date : =Concat(chr(39) & cob_date & chr(39), ',', cob_date)
but when I put the $(vCon_date) into a text box, I got "Error: Garbage after expression: "," "
Where am I wrong?
the qvw file is attached..
Thanks,
Michael
Hi,
Have you tried below script to concat the values?
ZZ
@msmichael wrote:
vCon_date : =Concat(chr(39) & cob_date & chr(39), ',', cob_date)
Just remove the Red color text
Hi!
Use
vCon_date directly instead
$(vCon_date)
Best Regards
Hi,
vCon_date = Concat(chr(39)&cob_date&chr(39),',')
now check in textbox =vCon_date
result : '12/1/2018','12/2/2018','12/3/2018','12/4/2018'
if you given variable calculation without equal sign (=) use $(vCon_date )
Thanks
Hi,
Thanks for your reply. I have to do it in an expression, so can't do it this way..
Michael
Hi,
Thanks for your reply, but I need the dates to be sorted, so can't remove the red color text..
Michael