No announcements

### Calculating age using sql server function

T-SQL Scripts New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server ...
| 37 Replies | 144620 Views | Created by Prince of Dhump - Wednesday, September 27, 2006 12:23 PM | Last reply by scott_morris-ga - Monday, October 13, 2014 3:39 PM

### Calculating %age using Function

Punia, It works the exact same way in SQL Server as it does in Excel. Just substitute the cell references for the column names. Jason Long
| 8 Replies | 4757 Views | Created by punia - Wednesday, April 13, 2011 11:34 PM | Last reply by punia - Thursday, April 14, 2011 1:05 AM

### Calculating age with date function

There are some good articles / solutions on how to calculate a person's age (for example this one: http
| 5 Replies | 3898 Views | Created by Kenny_Gua - Friday, September 2, 2011 2:57 PM | Last reply by Gert-Jan Strik - Sunday, September 4, 2011 4:36 PM

### calculating an age range correctly.

Hi there,  I am trying to calculate getting the people within a certain age range.  SO I have written this code.  (DATEDIFF(minute,D.DOB
| 3 Replies | 620 Views | Created by cr_banks - Friday, August 26, 2016 2:01 AM | Last reply by Sam Zha - Friday, August 26, 2016 3:07 AM

### Calculating Age in 6 months - inaccurate results

Hello, I am using the code below to generate a list of current ages and the age in 6 months based on the date of birth: SELECT PERSON_ID, ...
| 3 Replies | 597 Views | Created by airwalker2000 - Monday, October 24, 2016 8:46 AM | Last reply by Tom Phillips - Monday, October 24, 2016 12:45 PM

### Calculating Integer field to get age

convert int to type string. I am using the code example from this StackOverflowquestion. Substituting &quot
| 3 Replies | 1220 Views | Created by reigh7 - Friday, November 29, 2013 10:54 PM | Last reply by reigh7 - Monday, December 2, 2013 6:51 PM

### Calculating Age according to Date of Birth

ALTER TABLE TableName ADD AGE AS ( DATEDIFF(hour,BIRTHDATE,GETDATE())/8766 )
| 4 Replies | 2517 Views | Created by Sid Williams - Wednesday, August 24, 2016 6:54 AM | Last reply by Sam Zha - Wednesday, August 24, 2016 7:45 AM

### Calculating age by means of a parameter

Best Regards,Uri Dimant SQL Server MVP, http://sqlblog.com/blogs/uri_dimant/ MS SQL optimization:
| 4 Replies | 2351 Views | Created by Rita211 - Wednesday, May 29, 2013 2:06 PM | Last reply by Uri Dimant - Wednesday, June 5, 2013 11:34 AM

### Access 2010 - Calculating a persons age

means ultimo, not primo. That's probably the reasoning while DateAdd was decided to behave as it does, and my Age function reflects that. Of ...
| 26 Replies | 22930 Views | Created by Steven Schuyler - Monday, November 21, 2011 7:39 PM | Last reply by Ken Sheridan - Wednesday, January 15, 2020 6:38 PM

### integrating age function into subs

] ccage.DropdownListEntries.Item(1).Select Next Next End Sub The actual age function came ...
| 6 Replies | 1731 Views | Created by tonayie - Wednesday, August 1, 2012 10:12 AM | Last reply by tonayie - Wednesday, August 1, 2012 11:34 PM

### Calculating Age via DtPicker in VB 2010

question, I can't imagine ever having an empty record, but that aside, if you use this function then I would suggest you declare a temporary variable as type DateTime. Use DateTime.TryParse ...
| 5 Replies | 2791 Views | Created by ixthe3rd - Saturday, June 16, 2012 9:25 AM | Last reply by Cor Ligthert - Sunday, June 17, 2012 7:38 AM

### Calculating the 'age' of a list item

;   I tried using the formula =DATEDIF (Created, Today, "d") but the today function doesn't work for a calculated field.  HELP
| 1 Replies | 7301 Views | Created by aafm - Tuesday, March 23, 2010 1:14 PM | Last reply by Vikas Patel (SharePoint Consultant) - Tuesday, March 23, 2010 1:41 PM

### Calculating SQL Server Memory usage

interested in only calculating total sql server memory usage which i am not able to get using below query. Notes: ...
| 8 Replies | 3987 Views | Created by Manu_vmr - Saturday, September 28, 2013 4:12 AM | Last reply by Karthick P.K - karthick krishnamurthy - Tuesday, October 1, 2013 6:56 AM

### Calculating Age on a specific date

;      } It is just a "small child" algorithm. Instead of calculating anything, we simply count the years, months and days ...
| 13 Replies | 4565 Views | Created by Shashwat Tripathi India - Tuesday, January 10, 2012 12:25 PM | Last reply by Louis.fr - Wednesday, January 11, 2012 4:27 PM

### SQL Function for calculating IP Address

Avoid using scalar udf, please post sample data + desired result.Best Regards,Uri Dimant SQL Server MVP,
| 7 Replies | 4891 Views | Created by Priya Bange - Thursday, January 22, 2015 10:18 AM | Last reply by Priya Bange - Friday, January 23, 2015 10:28 AM

### Calculating aggregate function * 1000

I am not sure you will need a function. Most likely you should be able to do it directly in the main query using CROSS APPLY technique. If you post input structure, and desired ...
| 2 Replies | 2118 Views | Created by roaldha - Tuesday, October 25, 2011 2:21 PM | Last reply by Naomi N - Tuesday, October 25, 2011 3:24 PM

### Calculating values in sql server

Hi to all, Just want to ask if what is the right sql data type if i want to calculate things using sql server here is the ...
| 3 Replies | 2458 Views | Created by iamnewtosql - Friday, July 20, 2012 6:36 AM | Last reply by Joon84 - Friday, July 20, 2012 7:51 AM

### Function for calculating Percentiles

Slavek, There is no function in DAX like Excel`s Percentile(array, nth_percentile). However you can calculate percentiles using other available ...
| 3 Replies | 800 Views | Created by Slavek_D - Friday, December 5, 2014 2:07 PM | Last reply by Slavek_D - Friday, December 5, 2014 2:20 PM