How do I calculate a cutom duration

E

Eddiea

New user here. I want to calculate a custom duration.
I have the following custon columns duration1, start1, and finish1

I want to have duration be the duration between the dates start1 and finish 1
I have used the formular for duration 1 to be

DateDiff("d",[Start1],[Finish1])

But i get

#ERROR NA NA
#ERROR Sat 4/29/06 Thu 5/4/06

What am I doing wrong.

Also I'm not sure what the interval value should be or where it is explained.

Thanks
Eddie A
 
G

Gérard Ducouret

Hello Eddie,

Your formula is working fine for me. Of course it needs the fields Start1
and Finish1 to be filled with dates.
Just a comment : if you put this formula in a Duration field, you will have
to multiply by the number of minutes by day :
French version:
DateDiff("d";[Début1];[Fin1])*[Minutes par jour]

Gérard Ducouret
 
J

JudithJubilee

Hello Eddie A,

Good question!!

Your original formula looks OK actually but you will always get the #ERROR
message if one of your dates is NA. Try this:

Instead of Duration1 use Text1
Insert the formula
IIf([Start1]=[Finish1],"",(ProjDateDiff([Start1],[Finish1])/[Minutes Per
Day]) & " days")

This will calculate the working days using your default calendar

If you just want the duration between the two dates regardless of working
time insert this formula (Still in a custom Text field):

IIf([Start1]=[Finish1],"",(DateDiff("d",[Start1],[Finish1])) & " days")

This has worked on mine so post back if you are still having the problem or
need any other help.

Judith
 
E

Eddiea

Thanks it works fine.
--
Ed A


JudithJubilee said:
Hello Eddie A,

Good question!!

Your original formula looks OK actually but you will always get the #ERROR
message if one of your dates is NA. Try this:

Instead of Duration1 use Text1
Insert the formula
IIf([Start1]=[Finish1],"",(ProjDateDiff([Start1],[Finish1])/[Minutes Per
Day]) & " days")

This will calculate the working days using your default calendar

If you just want the duration between the two dates regardless of working
time insert this formula (Still in a custom Text field):

IIf([Start1]=[Finish1],"",(DateDiff("d",[Start1],[Finish1])) & " days")

This has worked on mine so post back if you are still having the problem or
need any other help.

Judith
--
Hope this helps


Eddiea said:
New user here. I want to calculate a custom duration.
I have the following custon columns duration1, start1, and finish1

I want to have duration be the duration between the dates start1 and finish 1
I have used the formular for duration 1 to be

DateDiff("d",[Start1],[Finish1])

But i get

#ERROR NA NA
#ERROR Sat 4/29/06 Thu 5/4/06

What am I doing wrong.

Also I'm not sure what the interval value should be or where it is explained.

Thanks
Eddie A
 

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