|
View Full Version : comparing dates in project
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
|
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 -- Jan De Messemaeker Microsoft Project Most Valuable Professional http://users.online.be/prom-ade/ +32-495-300 620 "Patrick" schreef in bericht news:1135865212.908091.14790@g47g2000cwa.googlegroups.com... > 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 >
|
In article <1135865212.908091.14790@g47g2000cwa.googlegroups.com>, "Patrick" wrote:
> 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
|
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. -- Rod Gill Project MVP Visit www.msproject-systems.com for Project Companion Tools and more "Patrick" wrote in message news:1135865212.908091.14790@g47g2000cwa.googlegroups.com... > 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 >
|
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 :-)) -- Jan De Messemaeker Microsoft Project Most Valuable Professional http://users.online.be/prom-ade/ +32-495-300 620 "Rod Gill" schreef in bericht news:eUzSFjKDGHA.3820@TK2MSFTNGP12.phx.gbl... > 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. > > -- > > Rod Gill > Project MVP > Visit www.msproject-systems.com for Project Companion Tools and more > > > "Patrick" wrote in message > news:1135865212.908091.14790@g47g2000cwa.googlegroups.com... > > 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 > > > >
|
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. -- Rod Gill Project MVP Visit www.msproject-systems.com for Project Companion Tools and more "Jan De Messemaeker" wrote in message news:%230Hd4CLDGHA.1424@TK2MSFTNGP10.phx.gbl... > 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 :-)) > > -- > Jan De Messemaeker > Microsoft Project Most Valuable Professional > http://users.online.be/prom-ade/ > +32-495-300 620 > "Rod Gill" schreef in bericht > news:eUzSFjKDGHA.3820@TK2MSFTNGP12.phx.gbl... >> 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. >> >> -- >> >> Rod Gill >> Project MVP >> Visit www.msproject-systems.com for Project Companion Tools and more >> >> >> "Patrick" wrote in message >> news:1135865212.908091.14790@g47g2000cwa.googlegroups.com... >> > 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 >> > >> >> > >
|
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 -- Jan De Messemaeker Microsoft Project Most Valuable Professional http://users.online.be/prom-ade/ +32-495-300 620 "Patrick" schreef in bericht news:1135865212.908091.14790@g47g2000cwa.googlegroups.com... > 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 >
|
In article <1135865212.908091.14790@g47g2000cwa.googlegroups.com>, "Patrick" wrote:
> 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
|
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. -- Rod Gill Project MVP Visit www.msproject-systems.com for Project Companion Tools and more "Patrick" wrote in message news:1135865212.908091.14790@g47g2000cwa.googlegroups.com... > 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 >
|
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 :-)) -- Jan De Messemaeker Microsoft Project Most Valuable Professional http://users.online.be/prom-ade/ +32-495-300 620 "Rod Gill" schreef in bericht news:eUzSFjKDGHA.3820@TK2MSFTNGP12.phx.gbl... > 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. > > -- > > Rod Gill > Project MVP > Visit www.msproject-systems.com for Project Companion Tools and more > > > "Patrick" wrote in message > news:1135865212.908091.14790@g47g2000cwa.googlegroups.com... > > 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 > > > >
|
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. -- Rod Gill Project MVP Visit www.msproject-systems.com for Project Companion Tools and more "Jan De Messemaeker" wrote in message news:%230Hd4CLDGHA.1424@TK2MSFTNGP10.phx.gbl... > 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 :-)) > > -- > Jan De Messemaeker > Microsoft Project Most Valuable Professional > http://users.online.be/prom-ade/ > +32-495-300 620 > "Rod Gill" schreef in bericht > news:eUzSFjKDGHA.3820@TK2MSFTNGP12.phx.gbl... >> 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. >> >> -- >> >> Rod Gill >> Project MVP >> Visit www.msproject-systems.com for Project Companion Tools and more >> >> >> "Patrick" wrote in message >> news:1135865212.908091.14790@g47g2000cwa.googlegroups.com... >> > 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 >> > >> >> > >
|
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 -- Jan De Messemaeker Microsoft Project Most Valuable Professional http://users.online.be/prom-ade/ +32-495-300 620 "Patrick" schreef in bericht news:1135865212.908091.14790@g47g2000cwa.googlegroups.com... > 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 >
|
In article <1135865212.908091.14790@g47g2000cwa.googlegroups.com>, "Patrick" wrote:
> 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
|
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. -- Rod Gill Project MVP Visit www.msproject-systems.com for Project Companion Tools and more "Patrick" wrote in message news:1135865212.908091.14790@g47g2000cwa.googlegroups.com... > 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 >
|
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 :-)) -- Jan De Messemaeker Microsoft Project Most Valuable Professional http://users.online.be/prom-ade/ +32-495-300 620 "Rod Gill" schreef in bericht news:eUzSFjKDGHA.3820@TK2MSFTNGP12.phx.gbl... > 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. > > -- > > Rod Gill > Project MVP > Visit www.msproject-systems.com for Project Companion Tools and more > > > "Patrick" wrote in message > news:1135865212.908091.14790@g47g2000cwa.googlegroups.com... > > 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 > > > >
|
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. -- Rod Gill Project MVP Visit www.msproject-systems.com for Project Companion Tools and more "Jan De Messemaeker" wrote in message news:%230Hd4CLDGHA.1424@TK2MSFTNGP10.phx.gbl... > 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 :-)) > > -- > Jan De Messemaeker > Microsoft Project Most Valuable Professional > http://users.online.be/prom-ade/ > +32-495-300 620 > "Rod Gill" schreef in bericht > news:eUzSFjKDGHA.3820@TK2MSFTNGP12.phx.gbl... >> 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. >> >> -- >> >> Rod Gill >> Project MVP >> Visit www.msproject-systems.com for Project Companion Tools and more >> >> >> "Patrick" wrote in message >> news:1135865212.908091.14790@g47g2000cwa.googlegroups.com... >> > 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 >> > >> >> > >
|
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 -- Jan De Messemaeker Microsoft Project Most Valuable Professional http://users.online.be/prom-ade/ +32-495-300 620 "Patrick" schreef in bericht news:1135865212.908091.14790@g47g2000cwa.googlegroups.com... > 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 >
|
In article <1135865212.908091.14790@g47g2000cwa.googlegroups.com>, "Patrick" wrote:
> 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
|
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. -- Rod Gill Project MVP Visit www.msproject-systems.com for Project Companion Tools and more "Patrick" wrote in message news:1135865212.908091.14790@g47g2000cwa.googlegroups.com... > 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 >
|
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 :-)) -- Jan De Messemaeker Microsoft Project Most Valuable Professional http://users.online.be/prom-ade/ +32-495-300 620 "Rod Gill" schreef in bericht news:eUzSFjKDGHA.3820@TK2MSFTNGP12.phx.gbl... > 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. > > -- > > Rod Gill > Project MVP > Visit www.msproject-systems.com for Project Companion Tools and more > > > "Patrick" wrote in message > news:1135865212.908091.14790@g47g2000cwa.googlegroups.com... > > 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 > > > >
|
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. -- Rod Gill Project MVP Visit www.msproject-systems.com for Project Companion Tools and more "Jan De Messemaeker" wrote in message news:%230Hd4CLDGHA.1424@TK2MSFTNGP10.phx.gbl... > 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 :-)) > > -- > Jan De Messemaeker > Microsoft Project Most Valuable Professional > http://users.online.be/prom-ade/ > +32-495-300 620 > "Rod Gill" schreef in bericht > news:eUzSFjKDGHA.3820@TK2MSFTNGP12.phx.gbl... >> 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. >> >> -- >> >> Rod Gill >> Project MVP >> Visit www.msproject-systems.com for Project Companion Tools and more >> >> >> "Patrick" wrote in message >> news:1135865212.908091.14790@g47g2000cwa.googlegroups.com... >> > 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 >> > >> >> > >
|
thanks for your help people, i have it sorted now. Much appreciated.
|
|
|
|