Dates In Tables

Jun 20, 2006

Hi all

I am creating a database and I need to know figures at the end of each week on staff performance.

How will I do this as I have to report to my bosses at the end of each week what targets have been hit.

The trouble I am having is generating this date at the start of each week, the figures have to stay on the system so I would require a new column of information at the beggining of each week. Can this be done as I am really struggling or am I asking to much from access, I am a begginer with a small amount of knowledge and I am using 2003 access

Thanks for any help and I hope you underdstand what I am trying to do

View Replies


ADVERTISEMENT

Queries :: Count Dates Between Dates In Two Tables

Jul 8, 2014

I have two tables with dates. Between (!) every two following dates in table1, I want to know the number of dates in table2. How do I write an SQL query for this? The tables I have are up to a few hundred records in table 1 and a few thousand records in table2. So to prevent that this takes hours I need a fast query.

To explain the query I need, for example:
table1
01/01/2014
15/01/2014
17/01/2014
30/01/2014

table2
01/01/2014
02/01/2014
05/01/2014
17/01/2014
18/01/2014
20/01/2014
21/01/2014
25/01/2014

So the answer of the query would be 2,0,4.

Explanation:
Between 01/01/2014 and 15/01/2014 in table 1 there are 2 dates in table2 (01/01/2014 is not included between the dates)
Between 15/01/2014 and 17/01/2014 in table 1 there are 0 dates in table 2
Between 17/01/2014 and 30/01/2014 in table 1 there are 4 dates in table 2

View 2 Replies View Related

Tables :: Calculating Date Of Birth From Dates In Tables

Nov 8, 2012

I have just started using Access 2010. I need to calculate student's ages from their date of birth to today's date. I have a column set up for the date of birth but can't figure out how to get this figure.

View 2 Replies View Related

Tables :: Automated Dates In Tables?

Nov 19, 2012

I am building a database and am trying to automate month names and years to appear in my table upon adding a new record. I have the code built to input the data I am calling from other tables, and have functioned it to work on a button click. Now I want the record to capture the current date and year everytime a new record is added and input that information into the respective fields.

View 3 Replies View Related

Validating Dates In Tables

Jun 20, 2007

Hi there, just a quick question really.
I have got a start date and an end date field in a table both in Date/Time data type. Can i validate the end date so that it cannot be longer than 5 days after the start date, that has been entered. Or is this impossible to do in a table?

Thanks for any help

View 10 Replies View Related

Count Dates From Two Different Tables

Jul 6, 2007

I would like to count only dates where the Close Date is less than or equal to the Target Date. Here is what I have done, but it does not work. any ideas how I might get this to work?

SELECT A.[SCA_Open Issue Tbl.ID] AS [IDCount],
A.[Criticality of Risk] AS [Criticality of Risk],
A.[Database] As [Database],
A.[Risk_assumed_without_mitigation] As [Risk Assumed WO Mitigation],
A.[OTS] As [OTS],
A.[Issue Closed Date] As [Close Date],
A.[Targeted Completion Date] As [Target Date]
FROM [EOY Closed SC&A Issues] A

UNION ALL SELECT B.[RefID] AS IDCount,
B.[complexity_desc] AS [Criticality of Risk],
B.[Database] As [Database],
0 As [Risk Assumed WO Mitigation],
B.[OTS] As [OTS],
B.[EndDate] As [Close Date],
B.[TargetEndDate] As [Target Date]
FROM [EOY Closed Risk Assessments] B

WHERE [Close Date] BETWEEN Date() <= [Target Date];

View 5 Replies View Related

Correlate Dates Between Two Tables

Apr 14, 2014

I have 2 tables. One has a single column that contains week starting dates for 18 months. The other table has a customer, start date, end date and hours worked fields. I want to create a table that shows by week starting in table 1 the customer and number of hours worked each week divided by the number of weeks specified by the date range in table 2. The dates used in table two match those in table 1.

Table 1

Week Starting
4/7/14
4/14/14
4/21/14
4/28/14
5/5/14
5/12/14

Table 2

Customer Start End Hours Worked

Acme 4/14/14 4/21/14 100
Supply 4/21/14 5/5/14 150

New Table or Query Result

Week Hours Worked
4/7/14
4/14/14 50
4/21/14 100
4/28/14 50
5/5/14 50
5/12/14

Not sure how to achieve this.

View 6 Replies View Related

Find Minimum Of Dates From Different Tables?

May 1, 2006

The database I'm working on is used for personnel budget projections. Because some employees are hired mid-year, I need to be able to use various dates in my projection calculations.

I have 3 different tables - one with the employee start date, the other with the fiscal year start date, and the last with the start date of certain special pay tables. In order for my projections to work correctly, I'll need to return in a query the minimum of these 3 dates. I know how to do a minimum value in a single field within a table, but don't know how to select a minimum from multiple values in multiple tables. Is this possible.:rolleyes:

View 1 Replies View Related

Query Dates With Unrelated Tables

Aug 31, 2004

I am trying to design a report that will Give information about down time and work time during the day.

I have three tables that I am trying to query:
TimeSheet - Employee name, date, etc.TimeSheetSub - Times worked (related to TimeSheet)Orders - Including Start and Complete dates and timesI want to find out on TimeSheet.Date Between TimeSheetSub.Arrived And TimeSheetSub.Departed how many minutes were worked on an order and how many many were not (Orders.Start And Orders.Complete).

When I try to combine these three tables in a query, though, it either ends with tons of records or doesn't work because the tables are unrelated. I was able to do it by making a subquery for the Orders part, but this will not work to make a report.

Any help on this matter would be greatly appreciated!

Regards,

Philip
Email Me
www.321green.com

View 4 Replies View Related

Tables :: Validation Rule In Between Two Dates?

Feb 22, 2013

What would the validation rules be between two dates:

>01/09/07 however <01/09/11
and also
>01/09/07 however <present day

View 2 Replies View Related

Tables :: Recording Multiple Dates?

Apr 24, 2013

I'm creating a database and wanted to set up my table.

It is for a service with clients where we need to carry out a review every 6 months, so I need to create a way of entering a date every time a review is completed, then ideally a field that automatically totals the number of reviews that have taken place, and another field that automatically generates the date of the next review due - based on 6 months after the last review date.

Is that possible? It seems silly to keep adding fields for potential reviews as most will only have between 1-3 but in theory it could be as many as 20, which would be a lot of wasted space and fields for most people!

View 1 Replies View Related

Tables :: Create Table With Dates And Day Name

Apr 26, 2015

I am very new with access database. Want to create table with Dates & DayName. For example, tblYear2015 with all dates from 1-Jan-2015 to 31-Dec-2015 in FirstColumn and DayName in second column as per date of First Column. DayName Should be entered automatically as per date entered in first column.

View 6 Replies View Related

Tables :: Dates In Text Field

Nov 14, 2013

I have a Table Named "Combined List 05/06/03" Within this table there is a Field named "Scheduled Date" which has dates but the field was created as a Text Field. How do I go about changing this field to a date field. I have approx 95,000 records in this table. Is their a way to change this field to a date field or can I create another date field and move that info over. Im using MS Access 2010.

View 9 Replies View Related

Querying For Dates From Oracle Linked Tables

May 11, 2005

I have linked tables from an Oracle database.
I want to run a query to find records that have dates in a defined range.
The date field in my linked Oracle table is in the date/time format.
When I run my Access query, I only get those records that have a date (and no time) in the field.
How can I get all records, even those with a date/time entry?

Thanks!

View 3 Replies View Related

Tables :: Calculate And Store Time From Dates?

Nov 11, 2012

We are collecting data from client files that have multiple dates (start_date, event1_date, event2_date, end_date.) For client protection purposes, we are absolutely not allowed to leave the facility with the actual dates. However, we want to know how many days have passed between each event. I thought about having the data collectors enter each date, have a calculated field store the time between dates, and then have the actual dates cleared when the record is saved or when the person moves to the next record.

View 14 Replies View Related

Tables :: Calculate Number Of Days From Two Dates In Table?

Apr 20, 2015

I am making a basic hospital management system in Access 2013.I have two tables named "Bed" and "Receipt". Bed(BedID,AssignedDate,PatientID,DischargeDate,Bed Charges) Reciept(ReceiptID,PatientID,BedCharges) I want to calculate "BedCharges" by calculating the number of days using "AssignedDate" and "DischargeDate" and then multiplying with a constant amount of charges per day. Also the BedCharges calculated in "Bed" Table also needs to be in the "Receipt" table. How can I count the number of days and then calculate the "BedCharges" in both the tables?

View 8 Replies View Related

Tables :: Updating Dates In Specific Records Within A Field

Nov 6, 2013

So I currently have a table that tracks medication activity for patients called tblMedRanges. The Fields are the ID, StartMedication, EndMedication, Med ID/Medication Name.

In the End of Medication, some patients are not currently active so they have a set date/time field property. What I have for right now is the default value is set to

Code:
=date()

So that when staff adds a new medication it is set to the current date. These patients are supposed to be active, but it doesn't update the default value. I want it to continue to update to the current date every time the database is open.

I have three options that I know of(or think I know of) to update but can't commit to one in particular :

1)I want these individual records in the field to update the current time for today and was considering using some kind of data macro code using before update.

2)The other idea I had was splitting up the field into an EndOfMedication field that would display a value only if their inactive, and an Active field (text, value list active/inactive choices) that would be used in a query to generate the current date as med field. This would take some crafty query work with comparisons later on to generate list of drugs that they were on for each visit.

3) set to text field and convert the field to date field for comparison in queries.

View 2 Replies View Related

Find Matching Dates In Tables A And B / Then Populate Blank Fields In A From B

Apr 30, 2012

I have a table tROE with a field listing all dates starting 1/1/10 to date (populated), and three fields for currency exchange rates [USD], [RSD] & [EUR] which are empty and need to be populated. I have another table tROEPartial that has the exchange rates for some of the dates starting 1/1/10 but not all. Their structures are identical. I want to add the exchange rates from tROEPartial to tROE where the dates match, leaving the unmatched fields in tROE blank.

View 3 Replies View Related

Tables :: Text File Import Function Will Not Recognize Dates In Certain Format

Oct 8, 2013

I upgraded to Access-2010 and the Text File Import function will not recognize dates in the format YYYY-MM-DD. The import dialogue sees enough to recognize the field as a date, but then every date encountered is written to the Import-Errors table. This is true whether the file has a .txt or .csv extension. The actual file format is .csv.

View 6 Replies View Related

Tables :: Claim Tracking Database - Structure For Dates Of Events Related To Claims

Feb 28, 2013

I am developing a claim tracking database that tracks dates of events that occur in the course of processing a claim; such as, Loss Date, Report Date, Estimate Date, Payment Date, etc.

I currently have the following tables set up:

tblClaim
ClaimID
ClaimNumber

tblEvents
EventID
EventName

tblClaimEvents
ClaimEventID
fkClaimID
fkEventID
EventDate

With this table structure there is a many-to-many relationship between Claims and Events, but, there will only be one of each event per claim. Is there a better way to set up the tables to enforce a 1-to-1 relationship?

I was planning on creating a form for the Claim table with a subform for the Events joined on ClaimID and fkClaimID, but that would allow users to create more than one set of Events per claim, if that makes sense.

View 4 Replies View Related

Queries :: Combine 4 Tables Data That Falls Within Dates - SQL Query Returns No Records

Oct 2, 2013

I have a complex database app that has a form called from the main form. It requires two inputs: BeginningDate and EndingDate and I use a calendar picker for date selection. Using data assigned to a variable, I build the SQL query in VBA. The result is:

Code:
SELECT [1733_All Print Orders].[Application], Sum([1733_All Print Orders].[TotalImages]) AS SumOfCCPC
FROM [1733_All Print Orders]
WHERE [Application] = 'CCPC' AND [StatementDate] >= #9/3/2013# AND [StatementDate] <= #9/30/2013#
GROUP BY [1733_All Print Orders];[Application]

[1733_All Print Orders] is a defined query that combines 4 tables together and there are data that falls within the dates for CCPC. But the query returns no records.

I pasted the query to the query builder and using different combinations, I isolated that the [StatementDate] >= #9/3/2013# portion is what returns no records

To complicate matters even worse, prior to today, it worked. I made some adds and changes to another area of the application, but did not touch this code.

View 1 Replies View Related

Tables :: Database With Updating Dates - Track Current Projects For Team At Work

Dec 27, 2013

I am creating a database that tracks current projects for my team at work.

Some projects are only due once (e.g., mailed brochures due on 1/1/14) and some are due at scheduled intervals (e.g., status report due monthly, quarterly, etc.)

Ultimately, I'm hoping that my end result will allow us to click on a form and look at what everybody has due that day, in the next 7 days, and so forth.

View 3 Replies View Related

Forms :: Dates As Column Headers To Update Table With Dates As Rows

May 12, 2014

Any way to have a form with Dates as column headers to update a table where the dates are stored in rows???

The table set up is like this:
tblOpHdr
DiaryID (PK) - OpDate (Date)

tblOpDetail
DiaryID (FK) - CostCode - MachineNumber - MachineHours - etc

I'm just wondering if there's any way I can do this with a datasheet or a crosstab type setup?

It's Access 2010.

View 1 Replies View Related

Queries :: Calculate Expiry Dates Of Training Courses - Due Dates Not Shown

Aug 28, 2013

I have built a query to calculate the expiry dates of training courses but I am trying to input a criteria so that only dates within 90 days of todays date show. I am using Date()<90 but it doesn't return the correct information. What the criteria should be for this?

View 1 Replies View Related

Queries :: Access 2007 - Select All Dates Between Two Dates?

Apr 9, 2015

I have a table of records, which has within it two date fields (effectively, a 'start' and 'end' date for that particular record)

I now need to create a query to perform a calculation for each date between the 'start' date and the 'end' date

So the first step (as I see it anyway) is to try to create a query which will give me each date between the two reference dates, in the hope that I can then JOIN that onto another query to perform the necessary calculation for each of the returned dates.

Is there a way to do this?

So basically, if for a particular record, the 'start' date is 01-Apr-2015 and the 'end' date is 09-Apr-2015, can I produce a dataset of 9 records as follows :01-Apr-2015

02-Apr-2015
03-Apr-2015
04-Apr-2015
05-Apr-2015
06-Apr-2015
07-Apr-2015
08-Apr-2015
09-Apr-2015

(The *obvious* solution would be to create a separate table of dates, from which I could just SELECT DISTINCT <Date> Between #04/01/2015# And #04/09/2015# - but that seems like a dreadful waste of space, if that table is only required to generate the above? And it would have to cover all possible options; so it would either have to be massive, and contain every possible date - ever! - or maintained, adding new dates as necessary when they are required. Seems horribly inefficient!)

Is it possible to just select each date between the two reference dates? Or can you only query something which exists somewhere in a table?

View 4 Replies View Related

Subtracting Dates From Adjacent Dates In Same Column

Sep 7, 2006

Hiya-

I have a database with 5000 entries, corresponding to about 10 entries for about 500 people. Each of the entries is dated, and I need to calculate the time intervals between each person's sequential entries in the table.

One way of doing this is to create another column that contains the date of the previous entry. I can then use DateDiff to subtract one date from the other and give me the difference in days.

This approach falls down if I then work with only a subset of the entries - I would have to re-enter the previous entry dates as the time intervals would have changed.

What I really need is a way of subtracting the date from the date in the cell directly above it. Will Access let me do this, or is there a better way?

Many thanks, Jules.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved