Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Ken Murphy
  Where is Ken Murphy?
 Springhill
 Canada
 Ken Murphy
 To: soumya g
  Where is soumya g?
 Hyderabad
 India
 soumya g
 Tags
Subject: RE: How to get the difference between the d
Thread ID: 155145 Message ID: 155159 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Other
Date: Wednesday, December 26, 2007 3:41:30 PM         
   


> Hai,
>
> I have one Doubt.
>
> Let me first explain that one.
>
> If we want the difference between two dates ( oct 21st and nov 1st), it will give 19.
>
> But the actual one is not this.
>
> Please Help me regarding this.
>
> ... Soumya

It sounds as if you are looking for the difference between Oct 21 and Oct 1 rather than Nov (not including the 21st.) To calculate the number of days between the two days, simply subtract one date from the other:
?DATE(2007,10,21)-DATE(2007,10,1) && give you 20

But if you do not wish to include the last or current day, then you must subtract 1 from the last or current day:
?(DATE(2007,10,21)-1)-DATE(2007,10,1) && give you 19


Ken
You shall know the truth - and the truth shall set you free. (John 8:33)

ENTIRE THREAD

How to get the difference between the d Posted by soumya g @ 12/26/2007 7:31:43 AM
RE: How to get the difference between the d Posted by tushar @ 12/26/2007 8:42:07 AM
RE: How to get the difference between the d Posted by venkataramesh cheruvu @ 12/27/2007 1:27:53 PM
RE: How to get the difference between the d Posted by Cetin Basoz @ 12/27/2007 2:47:59 PM
RE: How to get the difference between the d Posted by venkataramesh cheruvu @ 12/28/2007 1:06:12 PM
RE: How to get the difference between the d Posted by Jojo Sabino @ 12/26/2007 9:04:28 AM
RE: How to get the difference between the d Posted by Prasant T @ 12/26/2007 2:14:21 PM
RE: How to get the difference between the d Posted by Ken Murphy @ 12/26/2007 3:41:30 PM
RE: How to get the difference between the d Posted by Cetin Basoz @ 12/26/2007 5:32:19 PM