I need a formula or a function that will return a person's age in years and months. All the functions and formulas that I have seen to date and that I have used only calculate a person's age in years. Can anyone help?
I have this code for calculating the age from birthdate but i want if there is years no months or days appear
Public Function CalcAge(Birthdate As Date) As String Dim intYears As Integer, intMonths As Integer, intDays As Integer intMonths = DateDiff("m", Birthdate, Date) intDays = DateDiff("d", DateAdd("m", intMonths, Birthdate), Date)
I have a tblEmployment information in my alumni database. Main tbl is tblBiographical and has a one to many relationship to tblEmployment. TblEmployment stores beginning and end date for each employment record for an alum.
tblEmployment fields start date end date (which is null for current job)
Career type employer Name Job title
I have been asked to ouput career type for each alum's "first job" after graduating. I do not know how to indicate this on the first job record in tblEmployment so that I can generate a query. I want to know how many alum's first jobs were in x career type. In the future, I want to know how many alum's first jobs were in what career type and what their current career type is.
I have a table that lists computers I want to know the age of them for replacement purposes. I am using this function to populate a textbox on a form that updates my table. the results I am getting is a negative whole number I would like to get a positive number with one decimal place. so if computer was shipped September 24, 2010 my textbox would say 3.5 not -3
Here is my function
Code: Private Sub Form_Load() Dim theDate As Date Dim age As Integer theDate = Nz(Me.compDate.value, 0) If theDate > 0 Then age = DateDiff("yyyy", Now(), theDate) Me.compAge = age End If End Sub
I would like to be able to run a query that lists the number of years members have been subscribing (up to the current year). i.e. to show the year he joined, and how many years he has been a member (shown as a number).
I have a burron to run a query that auto populates 'start time' with NOW(). It has worked for 3 years and now I get an error message see attached. The only thing I did was change the program fromm 2000 to 2002.
I have a database that I am using to report metrics based on seasonally available data. What I am running into is the problem that the seasonally entered data doesn't start on the same date every year.
An example: I have data that was entered into my database last year starting July 26, 2004. This is considered part of week 1 of my season and I want to compare that data to records that started being entered on August 15, 2005. Which is week 1 of the 2005 season.
Records include the following information: id, date, other irrelevant details
Does anyone have any ideas on how I might be able to accomplish this? Thanks in advance for your help!
I have a database of people who have a "Joined" date. i.e. 09/1/2012. I would like to set up a query that tells me how long (in years) that they joined.
I am trying to create a parameter query to return dates that have 2 years remaining.
For example I have dates for when mortgages expire, and I want to recognise the dates that have two years remaining using a parameter query but I can't figure out if I use DateAdd or DateDiff.
I have a field that is giving me the number of business days between a period of time and then I want to subtract that number - the person's PTO time to see the actual days they were available...when I simply type the number in (see below) it works great but I want to set up a prompt that will ask me how many PTO Days to calculate as it will be different for each person I am quering...is this possible?
I have read the Microsoft article at http://support.microsoft.com/kb/q95918/ several times. However, I am looking for an expression I can place in the field name to calcluate the median of another field in the same query. Is this possible? If not, I don't understand how to call the function created in the Microsoft article.
Example (fields in the query) Expr1 Expr2:Median(Expr1)
I have made one form based on query. Its a invoice entry form. I have price, quantity and amount. I want when i enter price and quantity, amount should be calculated. I know its very simple for you. Any suggestion.
Hi All. I have Request, Device and Receive table. All table has DeviceID. I create query to calculate total amount of each type of devices which was requested by link Request and Device tables. And query to calculate total amount of each type of devices which was received by link Receive and Device tables. I would like to create Balance query to calculate: Total_Receive - Total_Request = Balance If devices in Request and Receive table is the same result is correct. But if in Receive table add new type of devices I cannot see amount of new device in Balance query. How to fix that problem? Thanks.
In a query that utilizes a table containing a yes/no field, is it possible to calculate the yes/no field and get a numeric return? If so, can you share how this could be accomplished. Thanks
I'm a bit confused with date codes. What I'm try to complish here is that how to add years and months from separate fields to text box, where's difference between two dates as an years and months? So basicly first I read year and month values from text boxes to a integer and then I'm going to add them to somewhere at last, but I'll get like 1 year and 14 months for result so, could you hit me with some tips or tricks what I should try out. I'll approciate your time to help me out with this and thanks for advance. =P
Firstly, when designing tables, how can I format Date/Time to just the Year? I've tried syntax yyyy, but when I enter a year after opening the table, I get a type mismatch error.
Secondly, providing I have the correct custom format for Year, how can I enter the following dates? 1744-1745 Circa 1925 Before 1690 1800s
And would I be able to run queries on them, showing the dates in ascending order?
I have atable the is storing ID, attendance_year and meeting code. Iw ould like to query the table and identify the IDs that have 10 consecutive attendance years no matter when it may have occured. So IDs have more than 10 row of data but not necassrily 10 years in a row.
How do I set up a query to sum data separately by year in the same row of data? I would like to see on one row a sum for year 2005 and also a separate field to sum for 2006.
Hi All I try to create a query based on Table1 and fields Date and Result. Is it posible to get a query that calculate two amount of Result field when that field is null and not null? That two values of Result field I will use to create monthly Pivot report in which each bar will display amonts Completed and NonCompleted result. Thanks.
I have a query that is based on orders table and contains "Qty", 'UnitCost', and "ctualUnitCost", in addition to yes/no control to indicate if "SalesTax" is applicable.
I want an expression in the query to calculate total cost in one of 2 conditions: if no sales tax then TotalCost = Qty*UnitCost if sales tax is applicable then Total cost = Qty*UnitCost*1.1