Hi there,
we try to emulate the AVG function for use with type DATE. How can we
convert DATE or TIMESTAMP to milliseconds? Or how can we get the average
of DATEs directly??
thx, kind regards 8 7863
Marcel Linnenfelser wrote: Hi there,
we try to emulate the AVG function for use with type DATE. How can we convert DATE or TIMESTAMP to milliseconds? Or how can we get the average of DATEs directly??
thx, kind regards
sorry for importuning you ... we found a solution:
select date(avg(days(m ydate))) from mytable
"Marcel Linnenfelser" <ne********@jus tweb.de> wrote in message
news:cb******** **@news.uni-kl.de... Hi there,
we try to emulate the AVG function for use with type DATE. How can we convert DATE or TIMESTAMP to milliseconds? Or how can we get the average of DATEs directly??
I don't think the AVG() function was ever intended to average dates, times,
or timestamps.
Just curious: what does an average of a bunch of dates *mean*? For instance,
if I took the average of your birthdate, the date I got my driver's licence
and the date that Helmut Kohl was first elected to public office, what would
the answer mean? What use would it be?
Rhino
> I don't think the AVG() function was ever intended to average dates, times, or timestamps.
Just curious: what does an average of a bunch of dates *mean*? For instance, if I took the average of your birthdate, the date I got my driver's licence and the date that Helmut Kohl was first elected to public office, what would the answer mean? What use would it be?
Rhino
We have to do that for statistical purposes. We implement a statistics
component for data generated for tpcw benchmarking. We do not ask such
questions because we HAVE TO do that at the university and many of the
things we have to do there are inane!!
Marcel
>> we try to emulate the AVG function for use with type DATE. <<
That makes no sense. Can you divide Christmas by Ramadan and get
Passover? You can average durations with something like
AVG(finish_time - start_time); is that what you meant?
>> we try to emulate the AVG function for use with type DATE. <<
That makes no sense. Can you divide Christmas by Ramadan and get
Passover? You can average durations with something like
AVG(finish_time - start_time); is that what you meant? jc*******@earth link.net (--CELKO--) writes: we try to emulate the AVG function for use with type DATE. <<
That makes no sense. Can you divide Christmas by Ramadan and get Passover? You can average durations with something like AVG(finish_time - start_time); is that what you meant?
It could make sense to get an "average time of year" for something to
happen.
I could see there being some fairly abstruse use for this when doing
some quasi-actuarial analysis, trying to find a midpoint for a bunch
of dates.
When it's some academic users that may be doing statistical analysis,
it sort of make sense for them to try to do odd things like this.
--
output = ("cbbrowne" "@" "ca.afilias.inf o")
<http://dev6.int.libert yrms.com/>
Christopher Browne
(416) 673-4124 (land)
It might be useful to average dates of invoices (or the dates they're
paid) to help understand cash flow. (Or to schedule callers in a
collection agentcy.)
Rhino wrote: "Marcel Linnenfelser" <ne********@jus tweb.de> wrote in message news:cb******** **@news.uni-kl.de...
Hi there,
we try to emulate the AVG function for use with type DATE. How can we convert DATE or TIMESTAMP to milliseconds? Or how can we get the average of DATEs directly??
I don't think the AVG() function was ever intended to average dates, times, or timestamps.
Just curious: what does an average of a bunch of dates *mean*? For instance, if I took the average of your birthdate, the date I got my driver's licence and the date that Helmut Kohl was first elected to public office, what would the answer mean? What use would it be?
Rhino
Is it really that stupid? The original question was:
<<we try to emulate the AVG function for use with type DATE. How can
we convert DATE or TIMESTAMP to milliseconds? Or how can we get the
average of DATEs directly??>>
You jump to averaging of DATE, which I agree does not make sense. But
the original question indicates that the user wants some sort of
midpoint (mean, median, mode) in a set consisting of dates. He was
right to think about using a transform to convert the DATE matrix to
another matrix relating to the passing of time.
<<Can you divide Christmas by Ramadan and get Passover?>>
Of course not; matrix arithmetic does not allow it.
But the writer wants to know, "Given DATE(XMas), DATE(end of Ramadan),
DATE (Passover), when should I start advertising sales of gifts in
general and for various festivals in particular (I agree that that's a
lousy marketing strategy, but you get the drift.)?
SS jc*******@earth link.net (--CELKO--) wrote in message news:<18******* *************** ****@posting.go ogle.com>... we try to emulate the AVG function for use with type DATE. <<
That makes no sense. Can you divide Christmas by Ramadan and get Passover? You can average durations with something like AVG(finish_time - start_time); is that what you meant? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: androtech |
last post by:
Hello,
I'm looking for a function that returns a date range for a specified week
number of the year.
I'm not able to find functions like this anywhere. Any pointers/help would
be much appreciated.
TIA
|
by: Richard Hollenbeck |
last post by:
I'm trying to write some code that will convert any of the most popular
standard date formats twice in to something like "dd Mmm yyyy" (i.e. 08 Jan
1908) and compare the first with the second and calculate days, months, and
years. This is not for a college course. It's for my own personal
genealogy website. I'm stumped about the code. I'm working on it but not
making much progress. Is there any free code available anywhere? I know it...
|
by: Tjerk |
last post by:
Hello all,
I have the script below to change an image depending on the date upto
january it worked fine but then it just stopped working does anybody have an
idea how I can make it work again or why it doesn't work?
Thanks in advance
Tjerk
|
by: Thomas R. Hummel |
last post by:
Hello,
I am importing data that lists rates for particular coverages for a
particular period of time. Unfortunately, the data source isn't very
clean. I've come up with some rules that I think will work to clean the
data, but I'm having trouble putting those rules into efficient SQL.
The table that I'm dealing with has just under 9M rows and I may need
to use similar logic on an even larger table, so I'd like something
that can be made...
|
by: Dr John Stockton |
last post by:
It has appeared that ancient sources give a method for Numeric Date
Validation that involves numerous tests to determine month length;
versions are often posted by incomers here. That sort of code seems
unnecessarily long.
For some while, the following approach has been given here :-
function ValidDate(y, m, d) { // m = 0..11 ; y m d integers, y!=0
| |
by: captain |
last post by:
Below is the sql for data with same date need
to extract + or - 5 days data of same date also.
How to also get data of + and - days related to same date.
SELECT IM.Area,
IM.Location,
IT.itemid,
IT.date,
|
by: Liz Malcolm |
last post by:
Hello and TIA. I have a DE form with an option group that if daily is
selected todays date is used for start and end date, if weekly is
selected Monday - Friday is used. I am trying to add a manual date
selection to clear the start and end date to allow the end user input
other days. I have taken into account our financial 1st and last day
of the month. I was able to break the option group into a select
case, but I cannot get the date...
|
by: James P. |
last post by:
Hello there,
In my asp.net page using VB, I have a date text field in mm/dd/yyyy
format. When a date is entered, I'd like to validate it to make sure
the date is greater than or equal to the current date. If not, I'd
like to display the error message to ValidationSummary.
It seems to make sense to me to use CompareValidator but the problem
is put the current date into CompareValidator. So, I created a hidden
text field in my aspx. ...
|
by: Assimalyst |
last post by:
Hi,
I have a working script that converts a dd/mm/yyyy text box date entry
to yyyy/mm/dd and compares it to the current date, giving an error
through an asp.net custom validator, it is as follows:
function doDateCheckNow(source, args)
{
var oDate = document.getElementById(source.controltovalidate); //
dd/mm/yyyy
|
by: JJ |
last post by:
Here's the code.
$link="http://xbox360cheat.org";
$close_date=$_POST; #last content change check
if ($close_date == 0)
$close_date = date("Y-m-d H:m:s", mktime(12, 0, 0, date("m"), date
("d")+7, date("Y")));
else if ($close_date == 1)
|
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,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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,...
|
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...
|
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();...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |