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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:56:20+00:00 2026-05-27T02:56:20+00:00

I have a problem. I have 3 text field for day, month, year to

  • 0

I have a problem. I have 3 text field for day, month, year to get date input from the user I do not want to use a date picker. Instead I create a string from all three inputs in the format dd/mm/yy and use a date formatter like so to assess the validity.

 NSDate *convertedDOB = [dobFormatter dateFromString:dateOfBirth];
if (convertedDOB == nil){
    NSLog(@"DATE EPIC FAIL");
}
else{ 
    NSLog(@"DATE OK");
}
[dobFormatter release];

If I enter something stupid like 10/40/88 it returns an error, however date of the type 40/12/88 or 30/02/88 go undetected. Is there anything I’m doing wrong? Thanks.

  • 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-27T02:56:21+00:00Added an answer on May 27, 2026 at 2:56 am

    You should probably use NSDatePicker so that errors like this can be prevented.

    http://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSDatePicker_Class/Reference/Reference.html

    Also, you may be getting nil as the date format entered is different to the date format of the NSDateFormatter.

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

Sidebar

Related Questions

I want to place UItextField in UITableViewCell but I have problem. Text field don't
I have a problem with datePicker. When a make a new text field with
I have a problem to get the values and text of the MultiSelectList to
I have some problem in drupal registration page. I want to change whole user
I have a UIDatePicker that only has month, day, and year. I am trying
I have a pick list to select a day and a text field to
I have these two form with text field (I have a problem with the
I have encountered strange problem. I have created simple Flash text field control and
So, I have this problem that when I word_wrap the text field. But when
I have problem with TinyMCE editor. I have form with few text fields and

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.