Date syntax in datediff formula

A

Andrew K

How do I express a literal date? 2006/08/31 quoted or unquoted isn't
working in the formula datediff=("d",[Finish],"2006/08/31") -- is the problem
that my view shows only summary tasks?
 
J

John

Andrew K said:
How do I express a literal date? 2006/08/31 quoted or unquoted isn't
working in the formula datediff=("d",[Finish],"2006/08/31") -- is the problem
that my view shows only summary tasks?

Andrew,
First, your literal expression for a date is correct (i.e.
"2006/08/31"). You could also use: #2006/08/3# but you cannot use:
2006/08/31.

Since you are using a formula I assume it is in a custom field (e.g.
Task Text1). And yes, if your active view only displays summary lines
then you will need to check the "Use formula" for Calculation for task
and group summary rows in the Customize Fields window.

John
Project MVP
 
A

Andrew K

John: Thanks.

I forgot is that in order for a custom field to work in a master with
inserted projects, every inserted project has to contain that custom field.
However,
in one of the stand-alone projects, datediff("d",[Finish],"2006/06/31")>0 in
a Text field flags summary tasks with Finish dates in August '06 -- with or
without "Use Formula". Same problem if I use a Number field. What do you
think?

John said:
Andrew K said:
How do I express a literal date? 2006/08/31 quoted or unquoted isn't
working in the formula datediff=("d",[Finish],"2006/08/31") -- is the problem
that my view shows only summary tasks?

Andrew,
First, your literal expression for a date is correct (i.e.
"2006/08/31"). You could also use: #2006/08/3# but you cannot use:
2006/08/31.

Since you are using a formula I assume it is in a custom field (e.g.
Task Text1). And yes, if your active view only displays summary lines
then you will need to check the "Use formula" for Calculation for task
and group summary rows in the Customize Fields window.

John
Project MVP
 
J

John

Andrew K said:
John: Thanks.

I forgot is that in order for a custom field to work in a master with
inserted projects, every inserted project has to contain that custom field.
However,
in one of the stand-alone projects, datediff("d",[Finish],"2006/06/31")>0 in
a Text field flags summary tasks with Finish dates in August '06 -- with or
without "Use Formula". Same problem if I use a Number field. What do you
think?

Andrew,
So you were holding out on me. I find a lot of posters are doing that
lately :)

With regard to your summary line issue in one file, that's a weird one.
Are you sure there isn't some data already in the spare text and number
fields for that summary line? If that is not the case, I guess I'd have
to see the file to be of any more help.

John
Project MVP
John said:
Andrew K said:
How do I express a literal date? 2006/08/31 quoted or unquoted isn't
working in the formula datediff=("d",[Finish],"2006/08/31") -- is the
problem
that my view shows only summary tasks?

Andrew,
First, your literal expression for a date is correct (i.e.
"2006/08/31"). You could also use: #2006/08/3# but you cannot use:
2006/08/31.

Since you are using a formula I assume it is in a custom field (e.g.
Task Text1). And yes, if your active view only displays summary lines
then you will need to check the "Use formula" for Calculation for task
and group summary rows in the Customize Fields window.

John
Project MVP
 
A

Andrew K

John, Thanks. I used the literal date in the datediff formula in another
file, and it works perfectly.

John said:
Andrew K said:
John: Thanks.

I forgot is that in order for a custom field to work in a master with
inserted projects, every inserted project has to contain that custom field.
However,
in one of the stand-alone projects, datediff("d",[Finish],"2006/06/31")>0 in
a Text field flags summary tasks with Finish dates in August '06 -- with or
without "Use Formula". Same problem if I use a Number field. What do you
think?

Andrew,
So you were holding out on me. I find a lot of posters are doing that
lately :)

With regard to your summary line issue in one file, that's a weird one.
Are you sure there isn't some data already in the spare text and number
fields for that summary line? If that is not the case, I guess I'd have
to see the file to be of any more help.

John
Project MVP
John said:
How do I express a literal date? 2006/08/31 quoted or unquoted isn't
working in the formula datediff=("d",[Finish],"2006/08/31") -- is the
problem
that my view shows only summary tasks?

Andrew,
First, your literal expression for a date is correct (i.e.
"2006/08/31"). You could also use: #2006/08/3# but you cannot use:
2006/08/31.

Since you are using a formula I assume it is in a custom field (e.g.
Task Text1). And yes, if your active view only displays summary lines
then you will need to check the "Use formula" for Calculation for task
and group summary rows in the Customize Fields window.

John
Project MVP
 
J

John

Andrew K said:
John, Thanks. I used the literal date in the datediff formula in another
file, and it works perfectly.

Andrew,
You're welcome.

John
John said:
Andrew K said:
John: Thanks.

I forgot is that in order for a custom field to work in a master with
inserted projects, every inserted project has to contain that custom
field.
However,
in one of the stand-alone projects, datediff("d",[Finish],"2006/06/31")>0
in
a Text field flags summary tasks with Finish dates in August '06 -- with
or
without "Use Formula". Same problem if I use a Number field. What do
you
think?

Andrew,
So you were holding out on me. I find a lot of posters are doing that
lately :)

With regard to your summary line issue in one file, that's a weird one.
Are you sure there isn't some data already in the spare text and number
fields for that summary line? If that is not the case, I guess I'd have
to see the file to be of any more help.

John
Project MVP
:

How do I express a literal date? 2006/08/31 quoted or unquoted
isn't
working in the formula datediff=("d",[Finish],"2006/08/31") -- is the
problem
that my view shows only summary tasks?

Andrew,
First, your literal expression for a date is correct (i.e.
"2006/08/31"). You could also use: #2006/08/3# but you cannot use:
2006/08/31.

Since you are using a formula I assume it is in a custom field (e.g.
Task Text1). And yes, if your active view only displays summary lines
then you will need to check the "Use formula" for Calculation for task
and group summary rows in the Customize Fields window.

John
Project MVP
 

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