system date

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • arunjyoti
    New Member
    • Aug 2007
    • 2

    system date

    I was going to make a simple program for calcualting one's age.

    I have made it . The user have to insert his date of birth and also current date(today's date)..

    but i want to calculate it without entering today's date by the user.

    I think to do that I have to take the system date.

    but I don't know how to do that.

    Please help.
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    Look at this page.

    I combination of time(...) and gmtime(...) or localtime(...) should give you what you want.

    Assuming of course that the computers clock is set correctly.

    Comment

    Working...