pdlarue
asked on
MPXJ - Can I change date format using the MPXJ object library? How?
Hi, experts:
I am successfully reading an MPP file using MPXJ. However, date formats are sometimes returning dd/mm/yyyy and other times returning mm/dd/yyyy. I can see the format in my Eclipse object browser but I'm having difficulty getting to it in my code. Can anyone offer the code to get to the MPXDateFormat?
MPXDateFormat df = new MPXDateFormat(); //MPXDateFormat cannot be resolved or is not a type
I'm giving this question high points because I need an answer as fast as possible. I do apologize for the rediculous constant crisis mode that my management produces. At least you don't have to work here.
Thanks in advance for your help,
Patricia
I am successfully reading an MPP file using MPXJ. However, date formats are sometimes returning dd/mm/yyyy and other times returning mm/dd/yyyy. I can see the format in my Eclipse object browser but I'm having difficulty getting to it in my code. Can anyone offer the code to get to the MPXDateFormat?
MPXDateFormat df = new MPXDateFormat(); //MPXDateFormat cannot be resolved or is not a type
I'm giving this question high points because I need an answer as fast as possible. I do apologize for the rediculous constant crisis mode that my management produces. At least you don't have to work here.
Thanks in advance for your help,
Patricia
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>> I need an answer as fast as possible.
Not that fast apparently ;°)
Sorry, going offline. Good luck.
Not that fast apparently ;°)
Sorry, going offline. Good luck.
ASKER
Hey, zzynx:
Yes, after struggling with MPXDateFormat (couldn't figure out how to make it visible to me) I used the SimpleDateFormat in java.util.Date. Now, I'm having trouble with the month being zero based (January comes back '00'). I'll figure it out soon. If you haven't guessed yet, I'm not new to objects but I am new to Java. I have to keep coming to you experts instead of researching it myself, because my manager is crazy.
Thanks again,
Patricia
Yes, after struggling with MPXDateFormat (couldn't figure out how to make it visible to me) I used the SimpleDateFormat in java.util.Date. Now, I'm having trouble with the month being zero based (January comes back '00'). I'll figure it out soon. If you haven't guessed yet, I'm not new to objects but I am new to Java. I have to keep coming to you experts instead of researching it myself, because my manager is crazy.
Thanks again,
Patricia
Thanks
>> Now, I'm having trouble with the month being zero based (January comes back '00').
Indeed. Stupid design.
>> I have to keep coming to you experts instead of researching it myself,
No problem ;°)
>> because my manager is crazy.
Like most :°D
>> Now, I'm having trouble with the month being zero based (January comes back '00').
Indeed. Stupid design.
>> I have to keep coming to you experts instead of researching it myself,
No problem ;°)
>> because my manager is crazy.
Like most :°D
input: a String containing dd/mm/yyyy or mm/dd/yyyy
output: a java.util.Date object
?
Then you need to use SimpleDateFormat and its function parse()