Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6574299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:14:37+00:00 2026-05-25T15:14:37+00:00

I have used the following code to get a start date for my new

  • 0

I have used the following code to get a start date for my new EKEvent:

event.startDate = [NSString stringWithFormat:@"%@", dateField.text];
event.endDate   = [[NSDate alloc] initWithTimeInterval:10 sinceDate:event.startDate];

The text is from a textbox and for example purposes, I put “2011/09/16”.

It came up with this error:

2011-09-15 20:53:20.541 iDHSB[205:707] -[NSCFString timeIntervalSinceReferenceDate]: unrecognized selector sent to instance     
0x10ef30
2011-09-15 20:53:20.566 iDHSB[205:707] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-  
[NSCFString timeIntervalSinceReferenceDate]: unrecognized selector sent to instance 0x10ef30'
*** Call stack at first throw:
(
0   CoreFoundation                      0x3624c64f __exceptionPreprocess + 114
1   libobjc.A.dylib                     0x36f9fc5d objc_exception_throw + 24
2   CoreFoundation                      0x362501bf -[NSObject(NSObject) doesNotRecognizeSelector:] + 102
3   CoreFoundation                      0x3624f649 ___forwarding___ + 508
4   CoreFoundation                      0x361c6180 _CF_forwarding_prep_0 + 48
5   EventKit                            0x31b7bc4d -[EKEvent setStartDate:] + 168
6   iDHSB                               0x00007b8b -[iDHSB_MobileAppDelegate alertView:clickedButtonAtIndex:] + 690
7   UIKit                               0x32a63cf3 -[UIAlertView(Private) _buttonClicked:] + 230
8   CoreFoundation                      0x361bc571 -[NSObject(NSObject) performSelector:withObject:withObject:] + 24
9   UIKit                               0x32955ec9 -[UIApplication sendAction:to:from:forEvent:] + 84
10  UIKit                               0x32955e69 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 32
11  UIKit                               0x32955e3b -[UIControl sendAction:to:forEvent:] + 38
12  UIKit                               0x32955b8d -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 356
13  UIKit                               0x32956423 -[UIControl touchesEnded:withEvent:] + 342
14  UIKit                               0x32954bf5 -[UIWindow _sendTouchesForEvent:] + 368
15  UIKit                               0x3295456f -[UIWindow sendEvent:] + 262
16  UIKit                               0x3293d313 -[UIApplication sendEvent:] + 298
17  UIKit                               0x3293cc53 _UIApplicationHandleEvent + 5090
18  GraphicsServices                    0x32813e77 PurpleEventCallback + 666
19  CoreFoundation                      0x36223a97 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 26
20  CoreFoundation                      0x3622583f __CFRunLoopDoSource1 + 166
21  CoreFoundation                      0x3622660d __CFRunLoopRun + 520
22  CoreFoundation                      0x361b6ec3 CFRunLoopRunSpecific + 230
23  CoreFoundation                      0x361b6dcb CFRunLoopRunInMode + 58
24  GraphicsServices                    0x3281341f GSEventRunModal + 114
25  GraphicsServices                    0x328134cb GSEventRun + 62
26  UIKit                               0x32967d69 -[UIApplication _run] + 404
27  UIKit                               0x32965807 UIApplicationMain + 670
28  iDHSB                               0x00002cfd main + 48
29  iDHSB                               0x00002cc8 start + 40
)
terminate called after throwing an instance of 'NSException'
(gdb) 

Why is this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T15:14:38+00:00Added an answer on May 25, 2026 at 3:14 pm

    EKEvent’s startDate property is declared as an NSDate but you are passing it an NSString. You need to parse the string into a NSDate first and then set the event date:

    NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
    [formatter setDateFormat:@"YYYY/MM/dd"];
    event.startDate = [formatter dateFromString:dateField.text];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code used to get xml from a DataSet into a
I have the following code to render text in my app, first i get
i have used following code to repeat a process creation/close iteratively dim vProcessInfo as
I have used following code to create a simple PDF file. It executes fine
I have used the following code in a number of applications to load .DLL
i have used the following code in .htaccess Options +FollowSymlinks RewriteEngine On RewriteBase /
I have the following code - it is used to load a drop down
I have used the code supplied in the following CodeProject article in the past
I have the following code in an Autofac Module that is used in my
I have used the following code to make a folder undeletable in my java

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.