comparing dates in project

P

Patrick

Hi all,

Another question for you all...

I have been tasked with searching through a couple of thousand project
plans, and comparing 2 dates. Unfortunately, the people I have been
given this task from, know nothing about project, and have stored the
dates to be compared in a text column.

So i need to compare the Finish, with Text20.

I am trying to format the dates to be the same. The biggest problem is
that one has 2 digit year, while the other has 4 digit year.

Any ideas on how i can compare these?

thanks

Patrick
 
J

Jan De Messemaeker

Hi,

Cdate(anyvalue) converts anything to date format (but it gives an error if
the input is not convertible)

If the time of day is not relevant use datevalue()

HTH
 
J

John

Patrick said:
Hi all,

Another question for you all...

I have been tasked with searching through a couple of thousand project
plans, and comparing 2 dates. Unfortunately, the people I have been
given this task from, know nothing about project, and have stored the
dates to be compared in a text column.

So i need to compare the Finish, with Text20.

I am trying to format the dates to be the same. The biggest problem is
that one has 2 digit year, while the other has 4 digit year.

Any ideas on how i can compare these?

thanks

Patrick

Patrick,
See your other post for a message about this newsgroup.

Just off hand, why not assign a couple variables that have been declared
as "Date" types. Then maybe use something like the DateDifference
Method. Be advised though that this method will compare the date and
time. If there is a difference it will return the difference in minutes.
Other methods might include breaking down the date into a string for
parsing and comparison.

John
Project MVP
 
R

Rod Gill

If the dates are both on the same task, add a formula to Date1 and Date2 to
convert the text to a proper date then do the result of the comparison in
Date3 or Number1.

You probably don't need a macro at all for this.
 
J

Jan De Messemaeker

Hi Rod,

My reflex would be to say, hurray, you can do it in VBA, you don't need the
ordeal of a formula without debugging aid nor serious help :))
 
R

Rod Gill

True, but formulas do give instant calculations without needing to run a
macro or code complex events that don't fire in all circumstances.

I find that if I build up a formula a step at a time I have few problems.
 

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