Jump to content
Welcome to InsanelyMac Forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.


Just Joined
  • Content count

  • Joined

  • Last visited

About bodalal

  • Rank
    InsanelyMac Protégé
  1. it works .. thaaaaaaaaaaaaaaaaaaanx alloooooooooooooooot
  2. thanx allot .. it is really helpful
  3. hi all My app contain Calendar date picker and label when i chose date from Calendar picker as "Birth date" then to calculate the age , it should calculate date between today (now) and the date in calendar picker i did everything right in interface builder, then i wrote this code : #import "AgeCalc.h" @implementation AgeCalc - (IBAction)calcut:(id)sender { NSDate *dBirth = [NSDate date]; NSDate *today = [NSDate date]; NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; unsigned int unitFlags = NSMonthCalendarUnit | NSDayCalendarUnit; NSDateComponents *components = [gregorian components:unitFlags fromDate:dBirth toDate:today options:0]; int years = [components year]; int months = [components month]; int days = [components day]; [txtResult setIntValue:years & @" Years " & months & @" Months" & days & @"Days"]; } @end BUT it does not work, nothing show up in the label can any one help me plz. thanx