473,698 Members | 2,149 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2050
"Stephen" <st*****@ebacuk .demon.co.ukwro te in
news:11******** **************@ b28g2000cwb.goo glegroups.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.ukwro te in
news:11******** **************@ b28g2000cwb.goo glegroups.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.ukwro te in
news:11******** *************@i 3g2000cwc.googl egroups.com:
>
Bob Quintal wrote:
>"Stephen" <st*****@ebacuk .demon.co.ukwro te in
news:11******* *************** @b28g2000cwb.go oglegroups.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
3503
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 error message and trace backs if the list exceeds eight items. Whether I use pickle or cPickle does not matter, i.e., the eight number causes a problem in both modules, although the trace backs are of course dissimilar. This pickling and...
4
6065
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 script that grabs some web pages from the web, regex parse the data and stores it localy to xml file for further use.. at first i had no problem using python minidom and everything concerning
27
3834
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 failed assertions for assertions that at first thought ought to hold, but that's not important.) At the end is a full program containing the above seemingly
5
3973
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 variable **var make it an array of pointers? I realize that 'char **var' is a pointer to a pointer of type char (I hope). And I realize that with var, var is actually a memory address (or at
2
2465
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. Regards, Manish Naik
0
5569
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 ******************************************************** For this teeny job, please refer to: http://feeds.reddit.com/feed/8fu/?o=25
16
1727
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 that input array on terminal. (in "main") 3.) we will reverse the array. (calling "reverse" in "main") 4.) we will print that reversed array. (in "main")
0
8671
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8598
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9152
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8887
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6515
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5858
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4360
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4613
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2321
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.