tags:

views:

25

answers:

1

I am working on calendar application. In this i have some issues with date format..

I am conflicting with two types of date formats..

one is -- 02-10-2010

second is - 02 Oct, 2010

but i want these formats be same..

any methods to convert from one format to second or second to first.. i searched date from string..but i cannot understand...

A: 

Check out NSDateFormatter.

Chuck
thank u..i have tried this
Kuldeep Sidhu
NSDate *date = [NSDate date];NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];[dateFormat setDateFormat:@"MMM d, YYYY"];NSString *dateString = [dateFormat stringFromDate:date]; [dateFormat release];but it always shows Jan 10,2010 why this...the date i am passing here is 2010-10-08..
Kuldeep Sidhu