Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calculating how many days have passed in a year?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00163001
Message ID:
00163004
Views:
26
James,

You can subtract two dates and VFP will give you the number of days between them. For example, {1/10/1998}-{1/1/1998} will return 9. You may have to add one if you want to count the first day of the year. It will automatically handle leap years.

>Is there an easy way to calculate how many days have passed since New Year's? I want to make sure it takes consideration of leap year too.
>
>TIA,
>James McCourt
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform