I am simply trying to take a date and add the value from another field
to it using the following expression:
=dateadd("d", " & Fields!new_tgddatefrom.Value & ",
Parameters!HolidayDate.Value)
new_tgddatefrom.Value is an int data type
HolidayDate.Value is a date
The expression works fine if I use an acutal number for the value to
add but when I use the field.value I get an error:
Overload resoution failed because no accessible 'DateAdd can be called
without a narrowing conversion.
Why or why is it so difficult to work with dates!?!? If anyone can
help me get this working I would sincerely appreciate it!
DebraTry =dateadd("d", Fields!new_tgddatefrom.Value, Parameters!HolidayDate.Value)
"Debralous" wrote:
> I am simply trying to take a date and add the value from another field
> to it using the following expression:
> =dateadd("d", " & Fields!new_tgddatefrom.Value & ",
> Parameters!HolidayDate.Value)
> new_tgddatefrom.Value is an int data type
> HolidayDate.Value is a date
>
> The expression works fine if I use an acutal number for the value to
> add but when I use the field.value I get an error:
> Overload resoution failed because no accessible 'DateAdd can be called
> without a narrowing conversion.
> Why or why is it so difficult to work with dates!?!? If anyone can
> help me get this working I would sincerely appreciate it!
> Debra
>|||William wrote:
> Try =dateadd("d", Fields!new_tgddatefrom.Value, Parameters!HolidayDate.Value)
>
That was the first thing I tried. While it doesn't error, it doesn't
actually add the number of days in Fields!new_tgddatefrom.Value, it
just shows the date which is in Parameters!HolidayDate.Value.
Any other suggestions?|||This is the proper function call:
= DateAdd(interval, number, date)
Are you sure you have valid datatypes and values for your parameters?
If the function is used in a report with multiple datasets or groupings, do
you need to declare a different scope for your function variables?
"Debralous" wrote:
> William wrote:
> > Try =dateadd("d", Fields!new_tgddatefrom.Value, Parameters!HolidayDate.Value)
> >
> That was the first thing I tried. While it doesn't error, it doesn't
> actually add the number of days in Fields!new_tgddatefrom.Value, it
> just shows the date which is in Parameters!HolidayDate.Value.
> Any other suggestions?
>
No comments:
Post a Comment