I got an application wich read XML file and extract data of the nodes and put the data into textfields.
One of the node is <date>20110305162831</date>
In my textfield I got: 20110305162831
Whish is not very understandable for enduser…
How can i format it like:
2011/03/05 16:28:31
Is it possible?
Here is my AppControler.m code:
NSMutableArray* dates = [[NSMutableArray alloc] initWithCapacity:10];
NSXMLElement* root = [doc rootElement];
NSXMLElement* root = [doc rootElement];
NSArray* dateArray = [root nodesForXPath:@"//Report/ReportCreationDate" error:nil];
for(NSXMLElement* xmlElement in dateArray)
[dates addObject:[xmlElement stringValue]];
NSString * date = [dates objectAtIndex:0];
[dateTextField setStringValue:date];
[doc release];
[dates release];
If someone can help me, it would be great!
Thanks in advance
Miskia
1 Answer