Gregory Eaton
Gregory Eaton

Reputation: 55

Why is this expression having a parameter mismatch

=FormatDateTime(DateAdd(DateInterval.Year, -1, Now()), DateFormat.ShortDate)

I get an error stating "The property ‘DefaultValue’ of report parameter ‘MIN_DATE’ doesn't have the expected type. (rsParameterPropertyTypeMismatch)"

Upvotes: 0

Views: 753

Answers (1)

ArturoAP
ArturoAP

Reputation: 432

FormatDateTime returns a string that represents the date, if you have the parameter set its data type to DateTime it will throw this error, you can either change the parameter datatype to string or you can just use

=DateAdd(DateInterval.Year, -1, Now())

Upvotes: 1

Related Questions