SQL Birthdate conversion

Results 1 to 3 of 3

Thread: SQL Birthdate conversion

  1. #1
    Join Date
    Dec 1969

    Default SQL Birthdate conversion

    I need a script to convert a birthdate; [format:12/03/1968] and return current age. - Many thanks for anyone who can help me out.<BR>

  2. #2
    Join Date
    Dec 1969

    Default Look into DateDiff and Date...

    functions. The link for the docs is on the left.

  3. #3
    Join Date
    Dec 1969

    Default RE: SQL Birthdate conversion

    in SQL easy<BR>select CASE<BR>WHEN dateadd(year, datediff (year, d1, d2), d1) &#062; d2<BR>THEN datediff (year, d1, d2) - 1<BR>ELSE datediff (year, d1, d2)<BR>END as Age

Posting Permissions

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