473,881 Members | 1,697 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

calculating date differences on dynamic variables

Not sure if my subject is entirely accurate but here goes.

I need to calculate the date difference between a date A and a date
B... however date B relies entily on date A.

EG: i have an advert in a paper (The Daily Telegraph say), now i need
to know the next and previos dates that this occured.

I can do this very easily for a one time calculations, however i need
to do this for many 000's of rows.

Now the real problem is this:

I have a list of say 1000 with a ID of 1, and a list of 800 with ID of
2.

Now i need to find the nearest dates (read next/previous) in table 2
for each entry in table 1.

Is this possible?

and if so any tips/helps much appreciated...

Thanks,

Beech

Jul 3 '06 #1
1 1863
On 3 Jul 2006 09:55:03 -0700, b.********@gmai l.com wrote:

Not entirely sure what you mean. Can you put this in terms of the
Northwind sample application? Also a great tool for us to experiment
with a query.
Perhaps you mean: give me a query that returns:
OrderID, OrderDate, OrderDatePrevio usOrder, OrderDateNextOr der

-Tom.

>Not sure if my subject is entirely accurate but here goes.

I need to calculate the date difference between a date A and a date
B... however date B relies entily on date A.

EG: i have an advert in a paper (The Daily Telegraph say), now i need
to know the next and previos dates that this occured.

I can do this very easily for a one time calculations, however i need
to do this for many 000's of rows.

Now the real problem is this:

I have a list of say 1000 with a ID of 1, and a list of 800 with ID of
2.

Now i need to find the nearest dates (read next/previous) in table 2
for each entry in table 1.

Is this possible?

and if so any tips/helps much appreciated...

Thanks,

Beech
Jul 4 '06 #2

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

Similar topics

6
9064
by: Ralph Freshour | last post by:
What's a good way to calculate the number of days between two dates in the following format: 2003-07-15 2003-08-02 I've looked at the PHP date functions but I'm still a bit lost...
4
4498
by: Hans Gruber | last post by:
Hi all, I have been struggling with a problem all day, I have been unable to come up with a working solution. I want to write a function which takes 2 unix timestamps and calculates the difference. I want it to return the difference in years, months, days, hours, minutes and seconds (a complete summary). Keeping into account of course that these are 2 real dates, I dont want it to work with 30.475 as an average number of days in a...
1
4312
by: Tony Williams | last post by:
I have a table with two fields, txtvalue (a number field) and txtmonth ( a date/time field). I want to create a report that shows the difference in value between the value in txtvalue in one value of txtmonth and the value of txtvalue in another value of txtmonth and the percentage increase . For example if I have the value 1000 in 30/03/03 and the value 1100 in 30/03/04 How do I calculate the difference as 100 and the increase as 10%. I...
1
2045
by: pauly | last post by:
Hello All, I have been trying to create a query that extracts data from a table and calculates the elapsed time between records. The table called "Imported_table". I need to be able to calculate the difference in dates when the vin and labourop are the same and not show any other records except for these and add a new field called days elapsed and odom elapsed. Refer to rough sample data below. Anyhelp would be greatly apreciated. VIN ...
15
7026
by: Paul Morrison | last post by:
Hi all, I need to come up with some differences between arrays in Java and C, I have searched Google and so far all I have found is the following: Arrays in Java are reference types with automatic allocation of memory. In C, arrays are groups of variables of the same type in adjacent memory. Allocation for dynamic arrays is handled by the programmer. This is an 8 mark question in an old exam paper, so I am assuming there are
10
47912
by: tkq | last post by:
I have a normal table with customer information I have a DoB field and I want to have an automatic calculation that will show the age of the customer in another field next to it called Age Could you please help me with this Thanx all
11
12577
by: blangela | last post by:
I am teaching a C programming course to C++ programmers and want to come up with list of _KEY_ differences between the two languages. Below is a list I have come up with so far. Have I missed any? Key Differences between ANSI C and C++ 1. C is a procedural programming language (where as C++ is an Object Oriented Programming language). This means that the C programming language does not support classes and all functionality provided...
1
1211
by: mmy | last post by:
Hi, I have the following problem: I have a Crystal Report with subreport. In every detail line of the subreport (with a field "price") I have to calculate something ("X"), depending on the field "price" and on 2 variables the user enters on a windows form (date and period). These 2 variables are always different and are no part of the table. In the report footer I have to make the sum of this calculated field. I understand it's...
1
1982
by: rodneyeid | last post by:
Hi, I have an attendance machine which saves records in an Access Database in the following format : UserID DATE/TIME Checktype where if checktype is 0 then its check in and if it is 1 then it check out I need to calculate number of hours for each userID /day. I.e UserID =1 DATE/Time= 11/12/2007 12:36 P.M CheckType=0 UserID = 1 DATE/Time= 11/12/2007 17:36 P.M CheckType=1 i am counting the day as being from 12:00 am till...
0
9931
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
9776
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
11105
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...
0
10403
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9556
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7113
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
5781
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...
1
4599
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3226
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.