Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Average calculating on date columns
Message
 
À
13/10/2008 07:00:34
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01354514
Message ID:
01354518
Vues:
11
>There is a better solution, but I can not remeber.
>
>As long:
>
>
>CREATE CURSOR murks (d1 d)
>
>INSERT INTO murks VALUES (DATE(2008,1,1))
>INSERT INTO murks VALUES (DATE(2008,1,5))
>
>*2 records avg is 3.1.2008
>
>CALCULATE AVG(DATE()-d1) TO lvg
>
>lvg = DATE()-lvg
>?lvg
>
>
>Agnes
>>Hi All,
>>i am trying to calculate average of dates
>>first i've tried in excel like below
>>
>> =sum(a1:a8)/12 && 12 row count
>>and excel gives me for eg. 11.02.2008
>> same thing in VFP doesnt work like sum(actDate)/cnt(*) naturally but i've also tried
>> avg(),eval() etc. functions but was not succesfull so ;
>>
>> how can i calculate average of dates like excel in VFP ?
>>
>>TIA

* part of my SQL Query below commands solved the problem Thanks Agnes and Gregory for your replies
DATE() - ( AVG(DATE()-ActDate)) as AvgDate,;
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform