Subject | Concatenating date + time to datetime in Dialect 1 |
---|---|
Author | Bob Murdoch |
Post date | 2004-11-12T16:26:29Z |
Using FB 1.5, I have a dialect 1 database with a table defined as
such:
create table T1 (
del_date date,
time_window_start varchar(20),
time_window_end varchar(20),
arrival_time date);
insert into T1 ('10/15/2004', '08:00 AM', '10:00 AM', '10/15/2004
09:00:00');
insert into T1 ('10/16/2004', '08:00 PM', '10:00 PM', '10/15/2004
22:30:00');
I need a way to tell whether the arrival time is between the
time_window_start and time_window_end.
To do this, I was trying this comparison:
arrival_time between cast(del_date || ' ' || time_window_start as
date) and cast(del_date || ' ' || time_window_end as date)
However, FB is unable to recognize '08:00 AM' as a valid time format.
Are there any options for effecting this comparison?
tia,
Bob M..
such:
create table T1 (
del_date date,
time_window_start varchar(20),
time_window_end varchar(20),
arrival_time date);
insert into T1 ('10/15/2004', '08:00 AM', '10:00 AM', '10/15/2004
09:00:00');
insert into T1 ('10/16/2004', '08:00 PM', '10:00 PM', '10/15/2004
22:30:00');
I need a way to tell whether the arrival time is between the
time_window_start and time_window_end.
To do this, I was trying this comparison:
arrival_time between cast(del_date || ' ' || time_window_start as
date) and cast(del_date || ' ' || time_window_end as date)
However, FB is unable to recognize '08:00 AM' as a valid time format.
Are there any options for effecting this comparison?
tia,
Bob M..