Results 1 to 3 of 3

Thread: [2.0] computing age by date

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2006
    Posts
    719

    [2.0] computing age by date

    how to compute age base on age; i do this code but it doesnt work;

    int age;
    DateTime bday;
    DateTime cdate;
    bday = DateTimePicker1.Value;
    cdate = DateTimePicker2.Today;

    age = cdate - bday;

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: [2.0] computing age by date

    Have a look here.

  3. #3
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: [2.0] computing age by date

    remember that
    Code:
    DateTime - DateTime = TimeSpan
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width