Day/Hour/Minutes Query

Nov 16, 2005

Can anyone tell me if there is a way of displaying a number, which represents the number of minutes of elapsed time, into the format days:hours:minutes elsapsed?

For instance the number (in minutes) 1530 would display as = 01:01:30. 1 day, 1 hour & 30 minutes of elapsed time.

Any help would be appreciated.

Paul.

View Replies


ADVERTISEMENT

Converting Minutes From A Query To Hours:Minutes On A Report

Jun 12, 2013

Basically I have a table setup where Time Fields are stored. What I need to do is in a Query, have the difference of two Time Fields calculated, and then displayed on a Report. Here's what I have so far...

Table

- Start Time
- End Time

Query

Difference Time: DateDiff("n",[Start Time],[End Time])

All that works fine and shows up on the report, except for the fact that the time is showed in straight minutes, so for a difference of 1:30 minutes, it just shows 90 minutes. I need to make it so that on the report in the Difference Time Text Box, it's showed as 1:30 instead of 90.

I tried putting the following in the Control Source for the Difference Time Text Box on the report, but it returns an error.

=[Difference Time] 60 & Format([Difference Time] Mod 60, ":00")

View 4 Replies View Related

Query Data By Hour

Jul 28, 2006

I have a very large dataset with over 11 million data records in three different databases! Currently the data is collected on average every minute, which is much too detailed! I would like to pull data for every site on the hour, or somewhere near the hour as some data was collected at different time intervals. (this latter part is a completely different issue, I would be happy just to get my first query working, then deal with data not collected exactly on the hour)

I wrote a query and tested it out on a very small portion of the data. It seems to be working, but for some reason won't pull data for the 2 pm, 5 pm, or 8 pm hours...even though the data is there in the table. Any reason why this may be? Even if I simplify the query to only pull out those hours, and not all 24 at once, the data still doesn't get selected. I really can't think of why it's not working. Any suggestions?

I've currently set up the Criteria in the time column of the query to look like this:
#1:00:00 AM# Or #2:00:00 AM# Or #3:00:00 AM# Or #4:00:00 AM# Or #5:00:00 AM# Or #6:00:00 AM# Or #7:00:00 AM# Or #8:00:00 AM# Or #9:00:00 AM# Or #10:00:00 AM# Or #11:00:00 AM# Or #12:00:00 PM# Or #1:00:00 PM# Or #2:00:00 PM# Or #3:00:00 PM# Or #4:00:00 PM# Or #5:00:00 PM# Or #6:00:00 PM# Or #7:00:00 PM# Or #8:00:00 PM# Or #9:00:00 PM# Or #10:00:00 PM# Or #11:00:00 PM# Or #12:00:00 AM#

Is there a better way to go about this?
Thanks!

Ok, I am still interested in knowing why the above query wasn't working should anyone know. But while thinking of how to deal with my other data not on the hour...seemed to have made a few queries that do the trick! Access is great...but sometimes very slow to get what you want done when you're still learning!

View 1 Replies View Related

Run A Create-table Query Every 2nd Hour

Sep 18, 2006

Hi
I have made a create-tabel query that I want to run every 2. hour. How can I set Access up to do this automatically?

eroness

View 1 Replies View Related

Convert Hours & Minutes To Minutes

Jan 22, 2008

How can I convert hours and minutes to minutes as an Integer?

For example, convert 2:15 to 135.

Any help is greatly appreciated.

View 8 Replies View Related

Query Maximum Number In Hour Per Day Every Cell ID

Jul 13, 2015

I need to know about "Need to query result from access2007 find only "one maximum number" in hour per day every cell ID"

How I use sql command?

See my file at ...

View 5 Replies View Related

Same Query Takes 1 Sec Or 5 Minutes!

Jan 31, 2007

I am truly stumped. I have a query that sometimes takes less than 1 second to run, and sometimes takes close to 5 minutes. I am making NO changes to the query. I first thought it was a network issue, so I moved the whole db, both front-end and back-end, offline. No change. So I thought maybe it was a linked table issue, so I moved all the tables used by the query to the front end. No change. Every once in a while, the query runs at lightning speed, less than 1 second. Most of the time, it takes 3-4 minutes, or longer.

Here's the SQL:
SELECT PCAInternalPareto1a.row, PCAInternalPareto1a.column, PCAInternalPareto1a.Noun, PCAInternalPareto1a.Rev, PCAInternalPareto1a.InspPoint, PCAInternalPareto1a.cell, PCAInternalPareto1a.DefectType, CLng(nz([firstofTruncatedOpSeq],0)) AS ZOpseq, Sum(PCAInternalPareto1a.DefectQty) AS SumOfDefectQty, PCAInternalPareto1a.poo, PCAInternalPareto1a.repcode
FROM PCAInternalPareto1a LEFT JOIN BOMOutRefDesOnly ON (PCAInternalPareto1a.RefDes = BOMOutRefDesOnly.RefDesOnly) AND (PCAInternalPareto1a.partno = BOMOutRefDesOnly.PCAItemNo)
WHERE (((nz([FirstOfComponentItemNo],0)) Like "*"))
GROUP BY PCAInternalPareto1a.row, PCAInternalPareto1a.column, PCAInternalPareto1a.Noun, PCAInternalPareto1a.Rev, PCAInternalPareto1a.InspPoint, PCAInternalPareto1a.cell, PCAInternalPareto1a.DefectType, CLng(nz([firstofTruncatedOpSeq],0)), PCAInternalPareto1a.poo, PCAInternalPareto1a.repcode;

PCAINternalPareto1a is itself a query, which always runs fast. BOMOutRefDesOnly is a table with about 84,000 records. I have indexes on the joined fields.

I know the where statement looks useless but I have my reasons for doing it this way. I tried deleting the where statement and it ran really fast. Then I re-added it, and it still ran really fast. THen slow again. I can't find any relationship between anything I've tried and the speed of the query!!!! What's going on??????

Access 2002

View 7 Replies View Related

Total Hours (or Minutes) In A Query

Oct 9, 2007

I have a table wherein the time worked by 25 employees are recorded. This table has the start time, endtime, break time and late times. The Late Time is the number of minutes that the employee is late to work. I am required to do a query of the team's (all 25 staff) late times per month. I have done a query which shows the late times of the individual on the dates that they were late to work and created a crosstab query for that.

I am going around in circles. How can I have a total of the team's late times in a query? Please, could someone please point me in the right direction?

View 6 Replies View Related

Hi, Need Help With Subforms Within The Hour

Feb 11, 2008

Hi, I have a main form with a subform inside it. The subform contains two records but only one is shown during form view, is there any way to show both records at the same time?

I am using continuous forms view for my subforms as i have to.

View 3 Replies View Related

Group By More Than 1 Hour

Jul 25, 2005

i have a table of time and dates and a value after it inn which i want to do a query which groups these values by every 3 hours e.g

my table
12/02/2001 00:00 6
12/02/2001 01:00 4
12/02/2001 02:00 8
12/02/2001 03:00 12
12/02/2001 04:00 7
12/02/2001 05:00 6


i want the query to do this
12/02/2001 02:00 18
12/02/2001 05:00 25

i cant find anything anywahere and its use ids for a chart in which the chart wizard allows grouping by 1 hour and not by more than 1 hour any help will be much obliged

cheers

View 1 Replies View Related

DMax + 1 Hour

Jul 1, 2006

I've searched the forum and can't quite find what I need so I'm asking for further guidance form all you Access masters out there!

I have a field 'Time' in the format of 'dd/mm/yyyy hh:mm' which has a default value of =DMax("Time ","[Monitoring]")+1.

This increments 1 on the 'dd' bit when each new record is created, however what I want is for the hour (hh) bit to increment 1 on each new record.

Not sure if I'm being niave but I thought it was some sort of formatting issue, so I've dabbled with a few but to little effect unfortunately.

View 6 Replies View Related

Convert Number To Hour

Jan 2, 2006

Hello Everybody...

I have a Question.
How do I convert a number (26) to 26:00 Hours.

The thing is.
I have a database that calculates the hours of overtime.

for example.

I work from 7:00 to 19:00.
Then I get 12:00 hours of total time.

The above is no problem.

But no I want to deduct the number 2 from 12:00 hours.

I hope to hear from u guys soon

View 2 Replies View Related

Adding One Hour Onto Time

Jun 14, 2007

Hi,
ive searched the forums for this but cant find anywhere.

how can i add one hour onto a time stamp please.

many thanks:confused:

View 4 Replies View Related

Number Of Hour Worked

Jun 3, 2006

Hello!!!
I've a trouble:
I have an Access DataBase with two tables:
1--Workers with fields (ID, Name and $/hour)
2--Marks with fields(ID, WorkerID, Datetime of mark)

Well, I need to generate a report with the following structure:

Name Worker / Number of days worked / Total Cost in $
---------------------------------------------------------------------------
Worker 1 / 19 / 13000$
Worker 2 / 20 / 21354$
Worker 3 / 12 / 12000$
...

Example of Workers Table Data:
ID / Name / $/hour
-------------------------------------------------------------------------
21367 / Worker 1 / 21,34$
54883 / Worker 2 / 54,87$
87364 / Worker 3 / 5,38$

Example of Marks Table Data:
ID / IDWorker / DateTime-Mark
-------------------------------------------------------------------------
6754-54 / 21267 / 19/05/2006 8:05:32
4327-12 / 54883 / 19/05/2006 8:07:12
7645-98 / 87364 / 19/05/2006 8:13:54
5432-99 / 21267 / 19/05/2006 14:05:32
7584-23 / 54883 / 19/05/2006 14:07:12
9485-23 / 87364 / 19/05/2006 14:13:54
... / 21267 / 19/05/2006 16:05:32
... / 54883 / 19/05/2006 16:07:12
... / 87364 / 19/05/2006 16:13:54
... / 21267 / 19/05/2006 20:05:32
... / 54883 / 19/05/2006 20:07:12
... / 87364 / 19/05/2006 20:13:54
... / 21267 / 20/05/2006 8:05:32
... / 54883 / 20/05/2006 8:07:12
... / 87364 / 20/05/2006 8:13:54
... / 21267 / 20/05/2006 14:05:32
... / 54883 / 20/05/2006 14:07:12
... / 87364 / 20/05/2006 14:13:54
... / 21267 / 20/05/2006 16:05:32
... / 54883 / 20/05/2006 16:07:12
... / 87364 / 20/05/2006 16:13:54
... / 21267 / 20/05/2006 20:05:32
... / 54883 / 20/05/2006 20:07:12
... / 87364 / 20/05/2006 20:13:54

The condition to increment number of days is:
YEAR(date-mark) != YEAR(date-mark) OR
MONTH(date-mark) != MONTH(date-mark) OR
DAY(date-mark) != DAY(date-mark)

for example:
1)
19/05/1982...time-mark // Worker 1
19/05/1982...time-mark // Worker 1
19/05/1982...time-mark // Worker 1
19/05/1982...time-mark // Worker 1
-----------------------------------> 1 days worked
2)
20/05/1982...time-mark // Worker 1
20/05/1982...time-mark // Worker 1
21/05/1982...time-mark // Worker 1
21/05/1982...time-mark // Worker 1
-----------------------------------> 2 days worked

Do you understand it?

Well, I've tried several SQL sentences, but I can't make the definitive sentence. Can you help me, please?

Note --> each Mark-Datetime represents an instant of time!!!

View 1 Replies View Related

Format For 24-hour Time

Mar 31, 2008

Okay,

Missing something simple here and can't figure it out. I want to display a time in military 24-hour format but can't get it to show the first "0" between the times 0000 - 0959.

Current statement is:

datTripTime = Format(datArr, "HH:mm")

What am I missing please???

Thanks

View 3 Replies View Related

Counting Values Into 1 Hour Bins

Jul 16, 2005

MY QUESTION:

I’m using Access 2002.

I’m trying to create a query that will COUNT the number of values within 1 hour time bins (e.g. 00:00 to 00:59, 01:00 to 01:59 etc). The catch is that I need to have every hour bin represented whether there is any value in it or not. I believe that I need to create a separate table of the bins that I want (include bin start-value & stop-values) and then bring this table into my query and join it to the original table.

I was able to construct the make table query below to COUNT the values in hour bins for which there were records, but I also need rows for all of the zero values;

SELECT [All NWHI Detections].Species, [All NWHI Detections].Transmitter, [All NWHI Detections].Island, [All NWHI Detections].Location, DatePart("yyyy",[All NWHI Detections.Date]) AS [Year], DatePart("m",[All NWHI Detections.Date]) AS [Month], [All NWHI Detections].Date, [All NWHI Detections.Date]-[SharkTaggingSummaryTable.DateDeployed] AS [TimeSinceTagged(days)], CDate2Julian([All NWHI Detections.Date]) AS [Julian Date], DatePart("h",[All NWHI Detections.Time]) AS HourBin, Count([All NWHI Detections].Time) AS TotalNumberofDetections INTO [GLM HourlyBins]
FROM SharkTaggingSummaryTable INNER JOIN [All NWHI Detections] ON SharkTaggingSummaryTable.Transmitter = [All NWHI Detections].Transmitter
GROUP BY [All NWHI Detections].Species, [All NWHI Detections].Transmitter, [All NWHI Detections].Island, [All NWHI Detections].Location, DatePart("yyyy",[All NWHI Detections.Date]), DatePart("m",[All NWHI Detections.Date]), [All NWHI Detections].Date, [All NWHI Detections.Date]-[SharkTaggingSummaryTable.DateDeployed], CDate2Julian([All NWHI Detections.Date]), DatePart("h",[All NWHI Detections.Time])
HAVING ((([All NWHI Detections].Species)="tiger"))
ORDER BY [All NWHI Detections].Transmitter;


Q1? Creating the hour bins table

This table will be very large because it will need to have 4 years worth of hour bins for each transmitter (N=15) and location (N=12). This results in 6,307,200 hour bins! How can I write a query to create this table, or is there a better way of doing this?

Q2? Bringing the hour bins table into the main query.

How do I include the hour bins table in the main query to get my final result.


Any help would be greatly appreciated! Thank you.

View 1 Replies View Related

Group By Hour Of Day And Count Records

Apr 24, 2006

is there a way to count - in one query - the number of records that fall between specific times:

Time CountOfRecords
0000-0100 7
0100-0200 2
etc
2300-2400 4or do i have to do separate grouping queries then separate counting queries for every hour of the day? a crosstab? something else perhaps? feels like i'm missing something obvious (i hope...).

View 2 Replies View Related

Queries :: How To Round Off Times To Nearest Half Hour

May 23, 2014

I am trying to round off times to the nearest half hour. To be clear, I don't want to only round down or only round up. I need the rounding to be to the nearest half hour. I want to do this in the query, not vba. I've attached a picture of the query.

View 3 Replies View Related

Need Ideas: Alert User When Record Hasnt Been Updated In Over An Hour

Jul 22, 2007

I have a form in continuous forms mode...
Each entry is something the user is supposed to check on once and hour and update.
I have a "Last updated" field.
Now() goes into that field every time the record is updated.
I have a querry that will show the users records that are over an hour old.

How can I get Access to pop-up a window or something to alert the user they need to look at something? It would be really nice if Aspect would start blinking in the task bar or something.

Thanks!

View 5 Replies View Related

Forms :: Sum Numeric Field On Form If Day And Hour Fields Are Null

Jan 8, 2014

What is wrong with this query?

=IIf(IsNull([OffPeakDay],IIf(IsNull([OffPeakHour],Sum([Import]-[Export]),0)))

What I want is to sum the field (Import minus Export which are numeric) on the form if the OffPeakDay AND OffPeakHour fields are null.

View 11 Replies View Related

Modules & VBA :: Display On Form Average Records Per Hour Added To Database

Sep 29, 2014

I am trying to display on a form the average number of lines/records per hour that a person is adding to the database.

Trying to work with Dfirst and DLast I'd subtract the time of the most recent record from the time of the first record entered and then divide the number of records to display the average per hour in a text box.

View 14 Replies View Related

2 Minutes Of Your Time Please

Mar 1, 2007

Hello all,

This forum has been a lifesaver in the past and I hope someone can help me now.

I have a Contacts form that is used to input all the client's information. (name, date of birth, address etc).

I want to be able to force the person entering the data to not be allowed to tab to the 2nd text box (or any other text box on the page) unless in the first text box data has been entered (the first text box is client name)

However, I also need to be able to overide this if the person entering the data clicks on a "Cancel" button (another button on the page which closes the form).

Is this possible and if it is any help would be greatly appreciated!

Thank you in advance,

Rob

View 14 Replies View Related

Converting Minutes

Oct 12, 2004

I have time sheets from the past I need to enter but have found that some years the time punch minutes are given as if an hour equals 100 minutes not 60. Other years the minutes are given correctly. How do I format this field so that if I type 3.75 it will convert to 3.45 hours? Will I have to add another field to enter this and then convert to my field where hours and minutes are correctly entered? :confused:

View 2 Replies View Related

5 Minutes Interval

Apr 20, 2006

I have a query that shows a list from GPS software (car fleet management), unfortunately the software is not capable of doing a decent reports thus I'm trying to use its data and do it myself.

The table structure is as follow:

Car, Date, Time, Position.

The time interval I have now is 1 minute (short time format), I don't need it so detailed, that's why I was thinking to limit this into 5 minutes interval.

Is it possible?

Thanks for any suggestions.

View 1 Replies View Related

Minutes And Seconds

Dec 6, 2004

Here's one that I'm having difficulty on. I know just enough about code to completely confuse myself, so if you answer this, please explain in detail. I have a training database, in which a portion of it stores the scores of events of a physical fitness test. Part of this test is a times 3 mile run. I need to calculate a point value for the submitted time, but here's my dilema...If I use the time/date feature it accepts the input as hh:mm, and will not let a time of more than 24 minutes be entered, since it sees this as 2400, or midnight in military time. I need the data to be inputed as mm:ss, and I have another text box that accepts this info and converts it to a point value. I would appreciate any help you could provide. Thanks in advance.

Scott

View 3 Replies View Related

Adding Minutes To A Time

Apr 20, 2006

Hi,

If I have a time like 22:00 and I want to add lets say 300 minutes to it; so it now shows 03:00 how do I do this? I can do it in Excel alright with the TIME function but cannot find a similar feature in Access

Liam

View 1 Replies View Related







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