1
votes

I have a string such as "5/12/2014 1:14:50 PM" and I am trying to extract the date (5/12/2014) from that string. I tried using (Created.Value contains the string):

SUBSTRING(Fields!Created.Value, 1,9)

But it gave me an error saying "The Value expression for the textrun 'Created>Paragraphs[0].TextRuns[0]' contains an error: [BC30451]Name 'substring' is not declared."

1

1 Answers

2
votes

There is no SubString expression in SSRS - you will need to use Mid:

=Mid(Fields!Created.Value, 1, 9)

Assuming all your inputs are well formed you could always convert the string to a date:

=CDate(Fields!Created.Value)

Then adjust the Format property to the Textbox.