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 1055079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T17:30:25+00:00 2026-05-16T17:30:25+00:00

I have been looking over StackOverflow and have not found any answers yet, if

  • 0

I have been looking over StackOverflow and have not found any answers yet, if I missed a post which answers this I apologize and would be grateful for the link.

I am trying to change a string “prod.Start” into a NSDate type for comparison with today’s date. The following code myDate returns “1753-01-01 00:00:00 -075258”

CODE:

NSDateFormatter *format = [[NSDateFormatter alloc] init];
[format setFormatterBehavior:NSDateFormatterBehavior10_4];
[format setDateFormat:@"MM/dd/yyyy hh:mm:ss a"];
NSDate *myDate = [format dateFromString: prod.Start];  //prod.Start = 1/1/1753 12:00:00 AM

Any suggestions/tips would be appreciated.

Thanks

edit:

Works now : thanks for all the help.
What I thought was an error was 12AM = 0 o’clock AM

I tried 12PM and output was “1753-01-01 12:00:00 -075258”

Thank you for also explaining the “-075258” = PST was curious about that.

  • 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-16T17:30:26+00:00Added an answer on May 16, 2026 at 5:30 pm

    You’re on the right track. The NSDate compare functions only work with that standard format, so that is the right output (though if my code doesn’t work, check Max’s solution). You now need to compare this to today’s date like so…

    NSDate *todaysDate = [NSDate date];
    BOOL isToday = [todaysDate isEqualToDate:myDate];
    

    That should give you what you’re looking for.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been looking over the internet for a while about this, but it
I have been looking over this code for the past hour, I cant see
I have been looking all over the internet and i found some good guides
I have been looking all over for this. I have two seperate prpt files
I have been looking over the web but have not come across an answer
I have been looking all over google to find some answers to my questions
Before anyone close this question or complain... I've been looking all over StackOverFlow site
I have been looking over the web for this but I can't seem to
I have been looking all over the Internet for an answer to this question
So I have been looking all over and I haven't quite found what I

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.