-2

Possible Duplicate:
How do i add 1 day to a NSDate?

I wan't to add time(10.00 AM) in NSDate

In string I get the data like this:

10:00 AM

I want to convert this time string to NSDate with current date.

In NSDate I wan't data like 2013-01-24 10:00:00 +0000

I want this data in NSDate.

Please suggest me how can I do this?

Community
  • 1
  • 1
Anki
  • 589
  • 2
  • 13
  • 22

1 Answers1

1
  NSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init] autorelease];

        [dateFormatter setDateFormat:@"hh:mm a"];

        NSDate *date = [dateFormatter dateFromString:@"10:00 AM"];
Bhavesh Lathigara
  • 1,355
  • 1
  • 15
  • 25