I am trying to figure out shift date for the night shift. So if the time is before 8:00 am then it is the night shift of the previous day. So I wrote this formula to do it. But it gives an error on the 3rd line (start of the if) saying "a date-time is needed here"
I don't understand it... need some help urgently.
Thanks
BG
DateVar ShiftDate;
// ShiftDate := {Summary.Date_Time};
if timevalue ({Summary.Date_Time}) <= #07:59:59# then
ShiftDate := Date({Summary.Date_Time}) - 1
else
ShiftDate := Date({Summary.Date_Time});
I don't understand it... need some help urgently.
Thanks
BG
DateVar ShiftDate;
// ShiftDate := {Summary.Date_Time};
if timevalue ({Summary.Date_Time}) <= #07:59:59# then
ShiftDate := Date({Summary.Date_Time}) - 1
else
ShiftDate := Date({Summary.Date_Time});