Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to Calculate the number of day between two date?
Message
From
27/12/2004 10:45:35
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00972333
Message ID:
00972357
Views:
15
>>>
? ldDate1 - ldDate2
>>>
>>>
>>>>
>>>> Could you tell how to calculate the number of day between two date?
>>>>
>>shouldn't it be
>>
>>? ldDate2 - ldDate1
>>
>>
>><s>
>>
>Peter,
>
>If you want to get negative number, sure. <eg>

lddate1=DATE()-100 && some time in the past
lddate2=DATE() && todate

?lddate1-lddate2
-100
?lddate2-lddate1
100 <---- that the correct answer usually date1 is earlier in history that date2

<s>

Peter
Peter Cortiel
Previous
Reply
Map
View

Click here to load this message in the networking platform