Click to See Complete Forum and Search --> : Summary for Date Fields


14Viking
May 8th, 2006, 02:45 PM
I am looking to compare the dates from two tables not directly related but do have a common relationship via other tables. Here is the code that is currently in the report (it does not work as desired)

if isnull(Maximum ({SERVICE_DISPATCH.DISPATCHED_DATE})) then
Maximum ({LABOR_TICKET.TRANSACTION_DATE})
else
if Maximum ({LABOR_TICKET.TRANSACTION_DATE}) > Maximum ({SERVICE_DISPATCH.DISPATCHED_DATE}) then
Maximum ({LABOR_TICKET.TRANSACTION_DATE}, {OPERATION.SEQUENCE_NO})
else
Maximum ({SERVICE_DISPATCH.DISPATCHED_DATE}, {OPERATION.SEQUENCE_NO})


Currently even if service_patch.dispatched_date is greater the result is null.

Any help would be greately appreciated.

tis707
May 9th, 2006, 12:24 AM
is it service_patch or service_dispatch

14Viking
May 9th, 2006, 11:47 AM
service_dispatch is the table dispatched_date is the field from this table.

Madhi
May 27th, 2006, 09:43 AM
try isnull(Maximum (CDATE({SERVICE_DISPATCH.DISPATCHED_DATE})))

instead of

isnull(Maximum ({SERVICE_DISPATCH.DISPATCHED_DATE}))