473,221 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,221 software developers and data experts.

Storing & Using the Last Read Value

Hi,

I have a table consists which cosists of batch numbers, and assosiated
dates and times..ie the columns are batch, date and time. The data
within the table is not in any particular order.

With a report, I need to calculate and display the difference in date /
times between like batch numbers, ie displaying batch number, start
date & time, finish date & time and duration

Any suggestions on a possible approch would be appreciated

Thank you
Stephen

Aug 5 '06 #1
3 2028
"Stephen" <st*****@ebacuk.demon.co.ukwrote in
news:11**********************@b28g2000cwb.googlegr oups.com:
Hi,

I have a table consists which cosists of batch numbers, and
assosiated dates and times..ie the columns are batch, date and
time. The data within the table is not in any particular
order.

With a report, I need to calculate and display the difference
in date / times between like batch numbers, ie displaying
batch number, start date & time, finish date & time and
duration

Any suggestions on a possible approch would be appreciated

Thank you
Stephen
When you say "between like batch numbers" do you mean similar
batch numbers or identical batch numbers?

As a general rule, one would use the sorting and grouping
features to group on the common portion of the batch numbers,
then sort on the individual batch numbers within the group, then
on start date./time. Calculating duration of the two fields in
the same row is done using the datediff() function to calculate
the difference between the two, Use the smallest unit of measure
(days, hours, minutes or seconds) that you wish to display, and
format the result to divide by the larger units to make it human
readable. Google in this newsgroup for a sec2dur() function that
does this formatting.

As to duration of the interval between adjacent start times,
from row to row, this is more difficult and requires some Visual
Basic code in the report, or a complex query that looks up the
previous start time. for the batch.


--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Aug 5 '06 #2

Bob Quintal wrote:
"Stephen" <st*****@ebacuk.demon.co.ukwrote in
news:11**********************@b28g2000cwb.googlegr oups.com:
Hi,

I have a table consists which cosists of batch numbers, and
assosiated dates and times..ie the columns are batch, date and
time. The data within the table is not in any particular
order.

With a report, I need to calculate and display the difference
in date / times between like batch numbers, ie displaying
batch number, start date & time, finish date & time and
duration

Any suggestions on a possible approch would be appreciated

Thank you
Stephen
When you say "between like batch numbers" do you mean similar
batch numbers or identical batch numbers?

As a general rule, one would use the sorting and grouping
features to group on the common portion of the batch numbers,
then sort on the individual batch numbers within the group, then
on start date./time. Calculating duration of the two fields in
the same row is done using the datediff() function to calculate
the difference between the two, Use the smallest unit of measure
(days, hours, minutes or seconds) that you wish to display, and
format the result to divide by the larger units to make it human
readable. Google in this newsgroup for a sec2dur() function that
does this formatting.

As to duration of the interval between adjacent start times,
from row to row, this is more difficult and requires some Visual
Basic code in the report, or a complex query that looks up the
previous start time. for the batch.


--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com
Hi Bob

Thank you for the reply...

"between like batch numbers", this could be a mixure of identical, and
similar numbers...
In the similar case, if the start time was not available for the batch,
then end time of the previous batch would be used..

This probally makes it even more complex than I originally thought, and
therefore only acheived with VB code (any suggestions would be
appriciated)...

I had hoped it was just a case of reading the table once, to create an
orderd list, and then from this list, read the record before and after
inorder to determine the start and finish times..

Best Regards
Stephen

Aug 5 '06 #3
"Stephen" <st*****@ebacuk.demon.co.ukwrote in
news:11*********************@i3g2000cwc.googlegrou ps.com:
>
Bob Quintal wrote:
>"Stephen" <st*****@ebacuk.demon.co.ukwrote in
news:11**********************@b28g2000cwb.googleg roups.com:
Hi,

I have a table consists which cosists of batch numbers, and
assosiated dates and times..ie the columns are batch, date
and time. The data within the table is not in any
particular order.

With a report, I need to calculate and display the
difference in date / times between like batch numbers, ie
displaying batch number, start date & time, finish date &
time and duration

Any suggestions on a possible approch would be appreciated

Thank you
Stephen
When you say "between like batch numbers" do you mean similar
batch numbers or identical batch numbers?

As a general rule, one would use the sorting and grouping
features to group on the common portion of the batch numbers,
then sort on the individual batch numbers within the group,
then on start date./time. Calculating duration of the two
fields in the same row is done using the datediff() function
to calculate the difference between the two, Use the smallest
unit of measure (days, hours, minutes or seconds) that you
wish to display, and format the result to divide by the
larger units to make it human readable. Google in this
newsgroup for a sec2dur() function that does this formatting.

As to duration of the interval between adjacent start times,
from row to row, this is more difficult and requires some
Visual Basic code in the report, or a complex query that
looks up the previous start time. for the batch.


--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Hi Bob

Thank you for the reply...

"between like batch numbers", this could be a mixure of
identical, and similar numbers...
In the similar case, if the start time was not available for
the batch, then end time of the previous batch would be used..

This probally makes it even more complex than I originally
thought, and therefore only acheived with VB code (any
suggestions would be appriciated)...

I had hoped it was just a case of reading the table once, to
create an orderd list, and then from this list, read the
record before and after inorder to determine the start and
finish times..

Best Regards
Stephen
May I suggest you fix the data, so that the times are properly
recorded.

If that's not possible, you could investigate using a recordset
in Visual Basic, to write the data to a temporary table. You can
use the .moveprevious and .movenext methods to get your data.

You could also use the report's .recordsetclone to move back and
forward and see the data for the current record.

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Aug 6 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: A.B., Khalid | last post by:
I wonder if someone can explain what is wrong here. I am pickling a list of dictionaries (see code attached) and unpickling it back using the HIGHEST_PROTOCOL of pickle and cPickle. I am getting an...
4
by: webdev | last post by:
lo all, some of the questions i'll ask below have most certainly been discussed already, i just hope someone's kind enough to answer them again to help me out.. so i started a python 2.3...
27
by: Daniel Vallstrom | last post by:
I'm having problems with inconsistent floating point behavior resulting in e.g. assert( x > 0.0 && putchar('\n') && x == 0.0 ); holding. (Actually, my problem is the dual one where I get...
5
by: jab3 | last post by:
(again :)) Hello everyone. I'll ask this even at risk of being accused of not researching adequately. My question (before longer reasoning) is: How does declaring (or defining, whatever) a...
2
by: Manish Naik | last post by:
Hi, Using ASP.Net, I want to store and retrive documents (Word, excel, etc) from SQL Server 2000 database. I have tried image type data field, but could not succed. Can any one help me please. ...
0
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
16
by: arnuld | last post by:
i am not able to make it work. it compiles without any error but does not work: what i WANTED: 1.) 1st we will take the input in to an array. (calling "getline" in "main") 2.) we will print...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.