Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Anil Sharma
  Where is Anil Sharma?
 ludhiana
 India
 Anil Sharma
 To: piyush Vaishnawswami
  Where is piyush Vaishnawswami?
 Rajkot
 India
 piyush Vaishnawswami
 Tags
Subject: RE: How to Between Time???
Thread ID: 330923 Message ID: 331005 # Views: 31 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: General VFP Topics
Date: Sunday, December 25, 2011 2:35:37 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.

you are doing wrong calculations
see the time in 24 format is

a= 15
b = 14
c = 12

and u r doing between(15,14,12)

so its .f.
either add +1 in "c" if 12 pm is for next day.


Anil


Accounting Software

Web Development

Accounting, Inventory, Hotel Management, Restaurant Kot Billing, MLM, Excise Accounting and much much more!.
My Blog

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