Database contain the following data
Schedule time Actual time.
01:10 04:00
02:00 05:00
04:00 08:00
05: 00 09:00
I need the report
Hour wise No of Train
Delay 2+hours 1
Delay 3+hours 1
Delay 4+hours 1
Can you please tell me the steps.
Are Scheduled time and actual time real timestamps?
yes
something like:
'Delay '||
cast(_round(((extract(hours,[Actual_time])*60+extract(minutes,[Actual_time]))
-
(extract(hours,[Schedule_time])*60+extract(minutes,[Schedule_time])))/60,0),varchar(4))
||'+ hours'
for the hourwise definition
Nice one though, it will give you parsing error. The code should be
'Delay '||
cast(_round(((extract(hour,[Actual_time])*60+extract(minute,[Actual_time]))
-
(extract(hour,[Schedule_time])*60+extract(minute,[Schedule_time])))/60,0),varchar(4))
||'+ hours'
Should be Hour not Hours, Minute not Minutes..
Thanks
PRIT, thanks for your correction..
syntax display parsing error
::).... What kind of error you are getting?
I had tested and worked fine for me. You must be missing something?