German Altersberechnung

Discussion in 'German Forum' started by Wolli013, Jun 16, 2015.

  1. Wolli013

    Wolli013 Active Member Licensed User

    Hi Leute, ich brauch mal wieder eure Hilfe.
    Gibt es eine einfache Formel um das Alter zu berechnen?

    Beispiel: Geb. 28.01.1978 = Alter ? (Heute)
    Vielen Dank schon mal vor ab.
     
  2. DonManfred

    DonManfred Expert Licensed User

    Code:
    Dim Datestart As Long = DateTime.DateParse("28.01.1978")
        
    Dim p As Period = DateUtils.PeriodBetween(Datestart,DateTime.Now)
        
    Log(p.Years&" Years, "&p.Months&" months, "&p.Days&" days")
     
    KL7000F and Wolli013 like this.
  3. Wolli013

    Wolli013 Active Member Licensed User

    Das ging ja schnell, vielen vielen Dank nochmal.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice