Date Format Conversion
Date Format Conversion
- Subject: Date Format Conversion
- From: Neto <email@hidden>
- Date: Thu, 22 Jun 2006 12:11:33 -0300
Hi all...
MyApp is loading each line (string) of a .txt file to my "tempArray"
and then, assigning each element of this "tempArray" to myArray.
This way, with your help, I implemented a simple "import from .txt
file" function.
Everything works fine except for one line.
One line of this .txt file is a date. In fact, it is a string
representing a date. It could be mm/dd/yy or dd/mm/yy
To I import that line I wrote:
[NSDate *tempDate=[tempArray objectAtIndex:(i+1)];
[myArray setValue:tempDate forKey:@"gdate"];
Note that @"gdate", in the other hand, is an NSDate object.
My two problems:
1. All dates are resulting in 12/31/00...the code above is not working.
2. How can I make MyApp reads the string line and recognize if it is
mm/dd/yy or dd/mm/yy?
Any ideas are welcome...
Thanks again
Neto
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden