
How to retrieve non-formatted values using getField():
Hi,
Val("12.5%") returns the number 12.5
save the date information into a date variable and you can reformat the date
into anything you want using Format$(date,"Long Date")
See help on conversion functions and Format for other methods.
--
Visit www.mvps.org/project/ for the Project MVP's FAQ and third party
add-ons
Rod Gill
Microsoft Project MVP
Visit www.projectlearning.com for customized Project and Office VBA macros
and Project companion software
Quote:
> Hi,
> I am trying to get the properties of a Task using the getField method. I
> choose not to get the property from the Task directly (eg.
> Task.PercentComplete) because I don't know which field I want to
> retrieve until runtime.
> The problem I'm facing is that, unlike the second method (getting the
> property directly), the getField method returns a formatted value i.e.
> Task.getField(PjField.pjTaskPercentComplete) returns "12.5%" rather than
> just "12.5"
> It is the same case for dates. getField returns the dates formatted
> according to the mask the user has chosen. Is there a way to use
> getField to return the "native" task property (like Task.PercentComplete
> or Task.Start)?
> Your help is appreciated.
> --Zahid.