 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
mARCELO Guest
|
Posted: Fri Mar 18, 2005 2:48 pm Post subject: Time interval |
|
|
In my table i have this data:
Initial Final Period
06:00 13:59 1
14:00 21:59 2
22:00 05:59 3
I will specify a initial and final time, and i want know what period is
this hours, like:
08:00 - 10:00 - at the period 1
03:00 - 03:30 - at the period 3
21:00 - 03:30 - at the period 2,3 and so on!..
Any sugestions?
|
|
| Back to top |
|
 |
Barak zabari Guest
|
Posted: Sun Mar 20, 2005 10:21 am Post subject: Re: Time interval |
|
|
I'm giving the idea not the exact SQL
Select 1, Initial,final
where (Initial>= 06:00 and Initial <14:00) (catch if the initial is in
range)
Or (Final>= 06:00 and Final <14:00) (catch if the Final is in range)
Or (Final >=14:00 and Initial <06:00) (Catch if they time start before and
end after)
Union
Select 2, Initial,final
where (Initial>= 14:00 and Initial < 22:00)
Or (Final>= 08:00 and Final <12:00)
Or (Final >=22:00 and Initial <14:00)
Etc....
"mARCELO"
| Quote: |
In my table i have this data:
Initial Final Period
06:00 13:59 1
14:00 21:59 2
22:00 05:59 3
I will specify a initial and final time, and i want know what period
is
this hours, like:
08:00 - 10:00 - at the period 1
03:00 - 03:30 - at the period 3
21:00 - 03:30 - at the period 2,3 and so on!..
Any sugestions?
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|