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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DateDiff Function Not Recognized

Status
Not open for further replies.

dbqrose

Technical User
Apr 8, 2010
1
US
thread1462-1527034

I found a datediff formula (see thread) that I think will work to count just working days in one of my Business Objects reports. My problem is that the DateDiff function does not show in the list of functions and when I manually enter it into the formula the program will not recognize it. I get an error message that says Invalid Identifier 'DateDiff'.

Is there some sort of add-in to get the DateDiff to add to the functions list or is there some workaround to provide the same result??

Here is the formula I am referring to:

=DateDiff ("ww", Fields!DateStart.Value, Fields DateEntered.Value, crMonday) +
DateDiff ("ww", Fields!DateStart.Value, Fields!DateEntered.Value, crTuesday) +
DateDiff ("ww", Fields!DateStart.Value, Fields!DateEntered.Value, crWednesday) +
DateDiff ("ww", Fields!DateStart.Value, Fields!DateEntered.Value, crThursday) +
DateDiff ("ww", Fields!DateStart.Value, Fields!DateEntered.Value, crFriday)

Thanks
 
Exactly as per that thread - your issue is almost certainly not with datediff but with the constants being referenced

try changing crMonday to vbMonday etc

that said, you mention using Business Objects - this is a REporting Services forum - please confirm which app you are using

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top