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

  • Home
  • SEARCH
  • 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 5929099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:22:37+00:00 2026-05-22T14:22:37+00:00

a simple test– – (void)viewDidLoad { [super viewDidLoad]; NSDate *date1 = [NSDate date]; NSDate

  • 0

a simple test–

- (void)viewDidLoad
{
[super viewDidLoad];

NSDate *date1 = [NSDate date];
NSDate *date2 = [NSDate dateWithTimeIntervalSinceNow:3];

NSTimeInterval timeBetween = [date1 timeIntervalSinceDate:date2];
NSLog(@"between: %@",timeBetween);    

}

It got an error in line “NSTimeInterval…”

program received signal:
‘EXC_BAD_ACCESS’

Would you tell me where is wrong?

  • 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-22T14:22:37+00:00Added an answer on May 22, 2026 at 2:22 pm

    you’re using a string format code instead of a number format code in your NSLog statement. try:

    NSLog(@"between: %f",timeBetween);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A simple test -- - (void)viewDidLoad { [super viewDidLoad]; date2 = [NSDate dateWithTimeIntervalSinceNow:3]; myTimer
A simple test app: cout << new int[0] << endl; outputs: 0x876c0b8 So it
Based on a simple test I ran, I don't think it's possible to put
I have a simple test bash script which looks like that: #!/bin/bash cmd=rsync -rv
I have created a simple test form with FormBorderStyle = FixedToolWindow by default and
I created a simple test page on my website www.xaisoft.com and it had no
I have a simple test application (C# console application) that does an HTTP GET
Here's the simple test to reproduce the issue, this is the single class in
I created a simple test with SendKeys, and tried both SendWait and Send. Private
I have made a simple test application for the issue, two winforms each containing

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.