Using datediff or projdatediff

O

Outlaw33

I am attempting to come up with a formula that will show me in days, th
difference b/w a finish date and a Start date on a different line. Her
is what is *not *working for me.
DateDiff("d",[Finish],([Unique ID]="10155",[Start]))
This of course gives me the #error, I have been beating my head o
this, and all the examples I can find use this for the same line,
Any help here would be greatly appreciated, I have tried the above i
the Duration1, Date1, and a text field.

Thanks

Ric
 
J

Jack Dahlgren MVP

Why do you have Unique ID in there?
Unique ID is not a date field.

DateDiff("d",[Finish],[Start]) should work.

In a custom field you can not reference any of the values of other tasks.
They work on a line by line basis and the fields are always those of the
task line.
The only exception are some project level fields like Project Start, Current
date etc.

-Jack Dahlgren
 
O

Outlaw33

the UID is pointing to the Start date line that I need to do th
comparison against. The start date is the beginning of Integratio
testing and I have about 75 BR's that I need to track, Integration dat
is set, so I need to track in a quick method when the BR's will b
finished coding. So the line by line will not help me any. I can use th
set date, however in the environment I am in that too may change.

Thanks

Ric
 
O

Outlaw33

the UID is pointing to the Start date line that I need to do th
comparison against. The start date is the beginning of Integratio
testing and I have about 75 BR's that I need to track, Integration dat
is set, so I need to track in a quick method when the BR's will b
finished coding. So the line by line will not help me any. I can use th
set date, however in the environment I am in that too may change.

Thanks

Ric
 
B

Bill B

You can't do what you want to do the way you want to do it. You need to
write VBA code to loop through tasks to update fields with values from some
other task. Like:

Sub DoSomething()
for each t in ActiveProject.Tasks
if not t is nothing then
if t.Text1 = "I need to update this task with data from 10155"
then
t.Number1 = DateDiff("d", t.Finish,
ActiveProject.Tasks.UniqueID(10155).Start)
end if
end if
next t
End Sub

Bill B
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top