Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using DateAdd with a dB datetime field 1

Status
Not open for further replies.

SQLHacker

MIS
Aug 10, 2006
45
US
I'm using SSRS 2005 connected to an Oracle (yikes!) 10g database and I'm getting all the fields I want, except I cannot get DateAdd to work. I'm pulling a datetime field from the database, and the end user wants that date field to appear on the report along with that date-plus-one for a "due date".

Anyway, I've tried the following and when I preview the report, the value in the field shows "#Error".

=DateAdd("Day",1,Fields!DATE_EXPECT_SHIP.Value)

Then I tried the following, with the same result:
=(DatePart("Day",Fields!DATE_EXPECT_SHIP.Value)+1)

Can anyone tell me what I'm doing wrong?
 
I think you want
Code:
=DateAdd("d",1,Fields!DATE_EXPECT_SHIP.Value)
 
Thanks! That worked! I can't believe the abbreviation works but the full name doesn't. Go figure!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top