Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Averaging date fields??
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00098244
Message ID:
00098249
Views:
25
>>Hi everyone. I am sorry if this question has been addressed multiple times, but I couldn't find any references. All I want to do is simply obtain an average of a large set of date fields. Thanks for your help!
>
>Karl, check out CALCULATE command.
>
>Nick

To be more precise, you can use something like

CALC AVG(VAL(SYS(11,mydateField))) to nDateNumber
myAvgDate = CTOD(SYS(10,nDateNumber))

To get the average date look real there should not be records with empty dates.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Reply
Map
View

Click here to load this message in the networking platform