M
Mary
Hi there,
I have a small database which keeps track of downtimes for our manufacturing
machines. The user will enter a date and time when the machine went down,
and when the machine is back up the user will enter this data as well.
I am now working on different ways to look at the data and I'm using the
following expression to calculate the time a machine has been out of
commission:
DateDiff("n",[downdate]+[downtime],[update]+[uptime])
This works well. The problem occurs when the machine is still down at the
time the report is run. Obviously there is no UpDate and UpTime noted yet,
so the calculation returns nothing.
Is there a way to tell the expression to use the current date and time if no
Update and Uptime has been recorded? Maybe some kind of IF statement?
Thanks,
Mary
I have a small database which keeps track of downtimes for our manufacturing
machines. The user will enter a date and time when the machine went down,
and when the machine is back up the user will enter this data as well.
I am now working on different ways to look at the data and I'm using the
following expression to calculate the time a machine has been out of
commission:
DateDiff("n",[downdate]+[downtime],[update]+[uptime])
This works well. The problem occurs when the machine is still down at the
time the report is run. Obviously there is no UpDate and UpTime noted yet,
so the calculation returns nothing.
Is there a way to tell the expression to use the current date and time if no
Update and Uptime has been recorded? Maybe some kind of IF statement?
Thanks,
Mary