Home Page for the TeradataForum
 
https:

Archives of the TeradataForum

Message Posted: Fri, 07 Jun 2002 @ 22:49:43 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Average Point in Time?
 
From:   Cornelius Meade

In my view, the thing to do would be to convert the time component time information into consistent units (seconds would be the obvious choice if you require that degree of precision otherwise minutes might be enough and you could simply ignore the seconds). This would be somewhat similar to your first approach. With all of the time information converted into consistent units, then you can average then as you would any set of numbers. The resultant average integer seconds or minutes value can then be converted back into a time value of the desired precision by reversing the transformation applied at the outset...

For example:
                            minutes since       seconds since
                            midnight            midnight
                   ----------------------       -------------
    2002-06-01 00:06:14     6                   374
    2002-06-01 00:16:09     16                  969
    2002-06-02 00:05:40     5                   340
    2002-06-03 00:05:38     5                   338
    2002-06-04 00:06:04     6                   364
    2002-06-05 00:05:34     5                   334
    2002-06-06 00:05:36     5                   336
    2002-06-07 02:58:37     178                 10717

                    AVG     27                  1721
                            00:27               00:28:41


     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 28 Jun 2020