DateDiff

  • Thread starter Thread starter John
  • Start date Start date
J

John

In a table there are three
columns, "ShipDate", "DaysGone", "Return Date". I would
like the "DaysGone" column to be automatically entered as
the difference between the "ShipDate" and the Current Date
IF there is currently no return date. If there is a
return date I would like a null value to be entered in
the "DaysGone" column.
Thanks,
John
 
Hi,
You would want this as a calculated column in a query:
**untested**
DaysGone: IIf([Return Date] Is Null,DateDiff("d",Date(),[ShipDate]),Null)
 
Back
Top