Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Rahul Moudgill
  Where is Rahul Moudgill?
 Toronto
 Canada
 Rahul Moudgill
 To: piyush Vaishnawswami
  Where is piyush Vaishnawswami?
 Rajkot
 India
 piyush Vaishnawswami
 Tags
Subject: RE: How to Between Time???
Thread ID: 330923 Message ID: 330969 # Views: 36 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: General VFP Topics
Date: Sunday, December 25, 2011 6:15:56 AM         
   


lcCurTime = '1:00:00 PM'
lcStTime = '08:00:00 PM'
lcEnTime = '12:00:00 PM'
?BETWEEN(CTOT(m.lcCurTime),CTOT(m.lcStTime),CTOT(m.lcEnTime))
?BETWEEN(CTOT(m.lcCurTime),CTOT(m.lcEnTime),CTOT(m.lcStTime))

Use Value type as DateTime for correct results



Rahul
> >
> >
> > Use DateTime variables
> >
> > lStartDate = DATETIME()
> >
> > lEndDate = DATETIME()
> >
> >
> > lSearchTime = CTOT( DTOC(DATE()) + "12:40")
> >
> > ?BETWEEN(lSearchTime,lStartDate, lEndDate)
> >
> >
> >
> > Anil
> >
> >
> > Accounting Software
> >
> > Web Development
> >
> > Accounting, Inventory, Hotel Management, Restaurant Kot Billing, MLM, Excise Accounting and much much more!.
> > My Blog
>
>
>
> Thanks Anil,
>
> but i have store start and end time with am,pm .
>
> lcStTime = '08:00:00 PM'
> lcEnTime = '12:00:00 PM'
>
> Now i want check current time is between start & end time.
>
> Regards
> Piyush

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