Hi I would like to know how to calculated records which was created yesterday at some time and calculate with today produced records. please look my code. FOR EACH womf_worder OF sfcf_au_ship WHERE womf_worder.word_production_status = "B" AND womf_worder.word_build_date = DATE(TODAY) AND womf_worder.word_build_time GE tt_shift.shft_start_hour AND womf_worder.word_build_time LE tt_shift.shft_stop_hour NO-LOCK: IF AVAILABLE womf_worder THEN DO: i = i + 1. END. tt_shift.shft_start_hour = 06:00:00 and stop_hour = 23:50:00 Here my question is how can calculate records which will be produced by tomorrow with yesterday records. How can i use DATETIME for this? Continue reading...