Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Jignesh Parekh
  Where is Jignesh Parekh?
 Rajkot
 India
 Jignesh Parekh
 To: piyush Vaishnawswami
  Where is piyush Vaishnawswami?
 Rajkot
 India
 piyush Vaishnawswami
 Tags
Subject: RE: How to Between Time???
Thread ID: 330923 Message ID: 331002 # Views: 26 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: General VFP Topics
Date: Sunday, December 25, 2011 2:29:53 PM         
   


> >
> >
> > lcStTime = CTOT(DTOC(DATE())+SPACE(1)+'08:00:00 PM')
> > lcEnTime = CTOT(DTOC(DATE())+SPACE(1)+'12:00:00 PM')
> >
> >
> > Anil
> >
> >
> > Accounting Software
> >
> > Web Development
> >
> > Accounting, Inventory, Hotel Management, Restaurant Kot Billing, MLM, Excise Accounting and much much more!.
> > My Blog
>
>
> Please Check
>
> SET HOURS TO 24
> SET DATE BRITISH
> LOCAL a as Datetime ,b as Datetime ,c as Datetime
> a = CTOT('25/12/2011 03:00:00PM')
> b = CTOT('25/12/2011 02:00:00PM')
> c = CTOT('25/12/2011 12:00:00PM')
> MESSAGEBOX(BETWEEN(a,b,c))
>
>
> Return .F.


The order of time in clock is

12:00:00 PM
02:00:00 PM
03:00:00 PM (03 is not between 12 & 2)

MESSAGEBOX(BETWEEN(a,b,c)) && gives .F.
but
MESSAGEBOX(BETWEEN(b,c,a)) && will give .T.



Regards,
Jignesh Parekh
--------------------------------------------------------------------------------------------------------------------------------
If better is possible, Good is not enough.

ENTIRE THREAD

How to Between Time??? Posted by piyush Vaishnawswami @ 12/24/2011 2:50:38 PM
RE: How to Between Time??? Posted by Anil Sharma @ 12/24/2011 3:04:47 PM
RE: How to Between Time??? Posted by piyush Vaishnawswami @ 12/24/2011 3:19:34 PM
RE: How to Between Time??? Posted by Anil Sharma @ 12/24/2011 3:30:42 PM
RE: How to Between Time??? Posted by piyush Vaishnawswami @ 12/25/2011 11:15:42 AM
RE: How to Between Time??? Posted by Anders Altberg @ 12/25/2011 11:55:18 AM
RE: How to Between Time??? Posted by Jignesh Parekh @ 12/25/2011 2:29:53 PM
RE: How to Between Time??? Posted by Anders Altberg @ 12/25/2011 6:09:04 PM
RE: How to Between Time??? Posted by Anil Sharma @ 12/25/2011 2:35:37 PM
RE: How to Between Time??? Posted by Rahul Moudgill @ 12/25/2011 6:15:56 AM