Date Diff Problem

Mar 19, 2008

Hello,
I am having problems creating a Exp to show the difference in time.
I am currently using :Expr1:DateDiff("n",[TimeReported],[TimeDefectGiven]) which is returning a figure in decimal.
If the answer was to be 90 minutes i need it to return the figure as 1.50 instead.

I have looked on the site using Date Diff and Time without success


Any help given would be great

View Replies


ADVERTISEMENT

Date Diff

Jan 29, 2008

hi all

im looking at doing a query to check records for absense

the 1st will be checking if the person has been absense for 4 weeks (28days) so i will have to check from absense date to today does that equal or greater than 28 days but lesss than 91 days (13 weeks) and is the return to work date blank

is that possible???

View 6 Replies View Related

Date Diff

Nov 7, 2005

Hello,
I have a form on which I have places a textbox named txtDOB which stored a date of birth.
I have then another text box which has the following function:

=DateDiff("yyyy",[txtDOB],Now())+Int(Format(Now(),"mmdd")<Format([txtDOB],"mmdd"))

Is there a way I can show the age + months?

Thanks.

View 5 Replies View Related

Date Diff Question

Sep 18, 2007

I have a date field, I am trying to have my query only pull the records that have a date entry that is within and up to 90 days from today or Now. For this query all other records are irrelevant.

THis is what I have found so far

=(Abs(DateDiff("y",Now(),[ls_Exp Date])))

Can someone show me how to add the 90 days in there?

Thanks.

Fen How

View 3 Replies View Related

Date Diff Problem / Please Help.

Oct 11, 2007

I'm using the date diff .... DateDiff("h",[Start time],[End time]) in a query and then I report the results in a report. I have run into a problem for the first time. I had a start time of 7:00pm, and an end time of 7:00am. This was calculated in the query as (-12) which is messing up my cost formula.

How do I resolve this?

Jerry

View 3 Replies View Related

Date Diff In A Query

Apr 27, 2006

Here we go:

My overall goal is to find out a worker’s downtime (count of weeks between assignments)

I have a qry_Downtime that pull in a worker and his current and future assignment. Each assignment is associate with a start and end date.

Here is how the results look:

Employee (joe schmo)ProjectONE ProjectONEStartDateProjectONEEndDate
Employee (joe schmo)ProjectTWO ProjectTWOStartDateProjectTWOEndDate
Employee (joe schmo)ProjectTHREE ProjectTHREEStartDateProjectTHREEEndDate
Employee (joe schmo)ProjectFOUR ProjectFOURStartDateProjectFOUREndDate

Downtime would be defined the diff in weeks between ProjectONEEndDate and ProjectTWOStartDate, ProjectTWOEndDate and ProjectTHREEStartDate, etc.

Any suggestions.
T

View 5 Replies View Related

Date Diff Problem

Jun 14, 2006

Friends,

I have a problem with a date diff calculation:
On my form I have placed two controls, a text box and a check box.

The textbox contains is a date field (mm/dd/yyyy).
What I need is a code that checks the checkbox if the date in the textbox is within the last 12 months.
This is the code I am using but not working:

If DateDiff("yyyy", textbox, Now()) >= 1 Then
Me.check1 = "yes"
End If

Any help? Thanks.

View 11 Replies View Related

Subtracting Time Without Date Diff

Jan 23, 2008

Hi I have two fields one which represents the time participants went to sleep, one when they woke up however I dont have any dates - it refers to what they do usually. Is it possible to minus sleeptime from waketime to determine duration of time in bed without dates? Or do I assign dummy dates to use date diff function?

View 4 Replies View Related

Queries :: Date Diff Expression

Oct 17, 2013

I am having a problem with a datediff expression.I have a query that pulls the first date and the last date out of a list but are put in seperate fields. I thought I could build an expression for datediff to calculate the number of dates between them. I can't just put in the dates because they are constently changing.The expression I have is:

[datediff("d",[min/max edging unit #2]![firstofupdate/time by month],[min/max edging unit #2]![lastofupdate/time by month])]

View 4 Replies View Related

Queries :: Dlookup Value From 1 Table With Date Ranges From Diff Table With A Single Date?

Mar 12, 2015

i have 2 tables.. 1 with bookings and 1 with a BonusPeriod range.

in the Bookings table there is a field called [ServiceDate]

in the bonus table i have a field called [Period] which is text i also have 2 dates, [StartDate] And [EndDate] i need to Dlookup the Bonus table to return the value of the period table based on where the [ServiceDate] falls.

i dont want to use VBA (i really need it to work within a query that inserts it's data into another table)

i've tried everything but had no joy

Expr1: DLookUp("[Period]","BonusPeriods","[ServiceDate]" Between "#[StartDate]#" And "#[EndDate]#")

Expr1: DLookUp("[Period]","BonusPeriods","[Staff_BookingsAndQuotes_Master].[ServiceDate]" Between "#[StartDate]#" And "#[EndDate]#")

Expr1: DLookUp("[Period]","BonusPeriods","(FormatDateTime([ServiceDate]),"yyyy-mm-dd") Between (FormatDateTime([BonusPeriods]![StartDate]),"yyyy-mm-dd") and (FormatDateTime([BonusPeriods]![EndDate],"yyyy-mm-dd"))))

View 10 Replies View Related

Queries :: Function To Calculate Date Diff In Network Days

Aug 7, 2014

I'm using the following function to calculate date diff in network days (excluding weekends)

Public Function NetWorkdays(dteStart As Date, dteEnd As Date) As Integer
Dim intGrossDays As Integer
Dim dteCurrDate As Date
Dim i As Integer
intGrossDays = DateDiff("d", dteStart, dteEnd)
NetWorkdays = 0

[Code] ....

So when using this function in a query to get number of networkdays between 2 date columns ...it works fine but throws a #Error where there is blank entries in either of 2 date columns...

I need to find a way to display Null instead of #Error...

I have tried this expression but no luck...

IIf(IsError(NetWorkdays([Date1],[Date2])),"",NetWorkdays([Date1],[Date2]))

View 7 Replies View Related

Date Diff [DATE] & Now

May 31, 2007

Is there a way in a query I can add a Date Diff option to calculate the time between a date that is in the query and now?

I was trying something like this but no luck

=DateDiff("d", [DateToPerson], [now])

Thanks

View 9 Replies View Related

Compare Tables From Diff Db's

May 5, 2005

hello, i have checked out the forum for pevious Q's to this problem and found the below.

http://www.access-programmers.co.uk/forums/showthread.php?t=80692&highlight=compare+tables

only problem is thats its writen at a bit too technicle a level from where i am. i've done some investigation into the problem though.

found out i need to use the docmd.transferdatabase function to import the tables i need to compare into my current db.

my question is this. how does it import them, does it create new tables within the current db or is it put somewhere in temp memory for use only while db is open, not sure how it would work. ideally i would like it to import tables, do the table comparison then create a report of the differences or make a new table showing the differences, then it reverts back to how it was before i imported it. i.e. he current databse is unchanged except for maybe a new report or new table (the results).

thank you for any advice.

Neil

View 1 Replies View Related

Diff Between Table Fields

Jun 7, 2005

How do I make a query that shows me the differences between two tables with relation to the fields.

View 1 Replies View Related

Calculation Between 2 Diff. Rows

Aug 21, 2007

hi everyone, i have a table of timeseies data and would like to run a query working out the difference between the current row's value (day) and a previous row (day, or days before) and put this difference in a new column in the resulting query.


I know it would be straight forward in Excel to run a formula between 2 different rows, but this table has >1 million records and are appended with new records regularly.

Any help or inspiration would be greatly appreciated!

View 14 Replies View Related

Diff Expresions Should Give Same Result But Don't!

Sep 22, 2006

I've got a table in which there are 20 numeric columns. For one report, I want to add all of the data in those columns together. I used the expression:

Seats: Sum(DailyActivity!PkgSeq01Cnt+DailyActivity!PkgSeq 02Cnt+DailyActivity!PkgSeq03Cnt+DailyActivity!PkgS eq04Cnt+DailyActivity!PkgSeq05Cnt+DailyActivity!Pk gSeq06Cnt+DailyActivity!PkgSeq07Cnt+DailyActivity! PkgSeq08Cnt+DailyActivity!PkgSeq09Cnt+DailyActivit y!PkgSeq10Cnt+DailyActivity!PkgSeq11Cnt+DailyActiv ity!PkgSeq12Cnt+DailyActivity!PkgSeq13Cnt+DailyAct ivity!PkgSeq14Cnt+DailyActivity!PkgSeq15Cnt+DailyA ctivity!PkgSeq16Cnt+DailyActivity!PkgSeq17Cnt+Dail yActivity!PkgSeq18Cnt+DailyActivity!PkgSeq19Cnt+Da ilyActivity!PkgSeq20Cnt)

Where dailyactivity is the name of the table, and pkgseq01cnt is the name of the first column, etc.

The expression returns the number 961.

If i make a query where i sum all of the columns individually, and then a query based off of that query where i add all of the sumed columns together, i get the number 965. (which, as far as i can tell, is the right number)
the expression in the second of those querries is:

Seats: Sum([seat]![SumOfPkgSeq01Cnt]+[seat]![SumOfPkgSeq02Cnt]+[seat]![SumOfPkgSeq03Cnt]+[seat]![SumOfPkgSeq04Cnt]+[seat]![SumOfPkgSeq05Cnt]+[seat]![SumOfPkgSeq06Cnt]+[seat]![SumOfPkgSeq07Cnt]+[seat]![SumOfPkgSeq08Cnt]+[seat]![SumOfPkgSeq09Cnt]+[seat]![SumOfPkgSeq10Cnt]+[seat]![SumOfPkgSeq11Cnt]+[seat]![SumOfPkgSeq12Cnt]+[seat]![SumOfPkgSeq13Cnt]+[seat]![SumOfPkgSeq14Cnt]+[seat]![SumOfPkgSeq15Cnt]+[seat]![SumOfPkgSeq16Cnt]+[seat]![SumOfPkgSeq17Cnt]+[seat]![SumOfPkgSeq18Cnt]+[seat]![SumOfPkgSeq19Cnt]+[seat]![SumOfPkgSeq20Cnt])

where 'seat' is the name of the first query that sums the columns.

I think those two ways should both come up with the same number - but i can't figure out why the first way is missing four! there are thousands of rows so it is hard to go through the table itself. Also, in both of those ways, the querry includes a 'where' column which limits it to rows where another column equals a certain word - but that's relatively straight forward - dont' know why that would make it different.

any ideas?

Thanks! It's driving me crazy!

View 2 Replies View Related

Find A Relation Between 2 Diff Tables

Apr 30, 2008

hi
i have a database to manage utility bill payment , it consist of
- Bills :
- billID
- Benificiary Name
-Cost Center
- Bills Transaction :
-TransID
-bILLid
-BillDate
-BillAmount
-Payment Transactions :
-PayTranID
-bILLid
-PayAmount
-PayDate
-BankRef

i made a union query from Bills Transaction and Payment Transactions to calculate bills balances which is : billid,sum(Bills Transaction.BillAmount)-sum(Payment Transactions.PayAmount)
all is working well , but the problem is i cannot find any relation between billtransaction
and billpayment ( per bill ) , cause i wish to payment details for each single bill transaction
the normal case is : bills issued as monthly basis but may fully or partially pay as the following cases :
- each bill transaction may fully pay one time
- in some cases : each bill transaction may fully pay but in multi settle
- multi bill transaction (per BILLID) may fully pay one time
IN CONCLUSION : each bill transaction should be stteled fully within one or two or maximum 3 months , say bill balance for each bILLID shall be zero.
how i could find a relation between this two transaction ( bills and payment ) to preview
payment information for each single bill transaction
exapmle :
billID : 39
BILL Transaction BillPayment BillsBalance
Bill Date - Amount PayDate- Amount
jan08 - 1000 1-1-2008 1000 0
feb08 -1200 5-2-2008 800 400
15-2-2008 400 0
mar08 1900 1900
apr08 1100 30-04-2008 3000 0
may08 1200 05-05-2008 900 300
jun08 1300 30-06-2008 1600 0

View 13 Replies View Related

Writing Different Tabs To Diff Rows

Dec 6, 2005

I need to know how to set up a form with three tabs, all of which having the same text boxes or method of data input. I want each tab to write the information input into different rows on my table corresponding to the tab (the tabs will correspond the the first column on the table). I have three rows on my table for three companies. I want a form that has a method of gathering the data for each company and writing that data to the corresponding row. I can set up the form with three tabs, all requesting the same info, but I don't know how to connect them to the corresponding rows.

View 10 Replies View Related

Different Background Color On Diff. Computers??

Jan 4, 2005

Does anyone know/how my forms' background colors are different from one computer to another? The computers that are showing the correct color are both XP and Access 2002 (one is a laptop and one is a desktop)... but then someone else.. on a laptop (with XP and access 2002).. the forms' background colors are not good (purple)... vs. blue on my laptop and the desktop. Thanks!

View 3 Replies View Related

Entering Data Into Form To Diff Tables

Apr 21, 2006

Is it possible in Access to create one input form that includes fields from different tables.

I want to create a single form that dispenses input fields to separate tables, I don't see anything to make this happen. I know you can retrieve data from separate tables utilizing querys. But is it possible to input data into a single form to multiple tables ?

View 2 Replies View Related

Search To 'pull' Data From Diff Table?

Mar 29, 2006

v sorry for the basic question, but ive been banging away at access and i cant my head around this..

i need to run a simple query. the query/ search will ask users to enter in the number of a document. i want, when this code is entered, for 2 controls on the form be updated with codes that are stored in a table based on the code they searched for originally.

heres my table structure...
Table A
Doc ID (PK)
Doc No (manually input and is the search item that users enter)

Table B
Unique ID (PK)
Doc No (FK)
Info (to populate field 1)
Info (to populate field 2)

how do i perform this in the query section? do i need to manually code the SQL required, or is this query basic enough that i can just select the fields required in the design view of the query?

thanks guys

View 1 Replies View Related

Form Displayed Diff After Opening Report.

Feb 18, 2006

I have via macro that displays the main interface to my database; frmMain (Maximize). This form frmSelectUIC (Minimize) allows me to select a department number of the data imported for analysis.
All is fine, as shown here;

http://members.cox.net/mustang31859/access/before.gif

However, after opening then closing any report the frmMain no longer is displayed as before.

http://members.cox.net/mustang31859/access/after.gif

Why the shift?

Gunner....:confused:

View 2 Replies View Related

Difference Performance Levels For Diff Users With Seemingly The Same Set-up?!

Aug 18, 2005

Afternoon Folks,

I have a database that multiple users have access to.
We all have new pcs of exactly the same spec.
We all have the same oracle ODBC, which is linking to tables in an oracle database on a Sun F15k Server.
The linked tables are set-up using my oracle account with saved password.
We are using the same network.
We are all using Access 97.

Queries that are run in this database are returning results in just a couple of seconds for other users, and 20-30 seconds for me.

Can anyone suggest any factors that may be causing this discrepancy?
Or things that I can run/do to improve performance?

Cheers in advance, James

View 14 Replies View Related

Queries :: Date / Time Query - Return All Records Of Specified Date Or Date Range

Aug 19, 2015

I have a table that has entries recorded with date and time in one field, and I want to have a query that returns all records of a specified date or date range, regardless of the time in the field.

I have tried

Code:
Between [StartDate:] And [EndDate:]

And

Code:
Between [StartDate:] & "00:00" And [EndDate:] & "23:59"

Neither of which work ....

View 13 Replies View Related

Modules & VBA :: Date Field To AutoPopulate Other Date Fields To Future Date

Oct 24, 2013

I'm trying to get my "IncidentDate" field to autopopulate two other date fields to a few days from the "IncidentDate". The other two date fields are "ContainDueDate" and "RootDueDate". I'm trying to accomplish this on my "Test CAP Form"

I tried using the following in the BeforeUpdate of "ContainDueDate" and received a complier error: expected =

Code : DateAdd(d,2,[IncidentDate])

so I removed the parenthesis and nothing happened

Code : DateAdd d,2,[IncidentDate]

I even tried redoing it in the AfterUpdate of "IncidentDate" and nothing happened either

Code : DateAdd d,2,[ContainDueDate]

I'm not sure if I'm even using the right function to get what I want.

View 4 Replies View Related

Year To Date Totals, Month To Date, Week To Date

Oct 9, 2005

Can someone tell me how to get year to date totals, month to date totals, week to dates in a query? I need to get all three for three different fields.

I was not able to get the totals with the formulas given. I received the totals for each day instead. Are there any other suggestions? I am trying to different formulas, but they are not working either. I did try doing different queries with the formulas to see if that would work.

View 9 Replies View Related







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