G
Guest
Good afternoon, i need some help with the following:
I have a maintenace DB, i have the following fields MachineHours (long int),
MaintenaceHours (long int), MaintenaceDate (date) and WeeklyHourWork (long
int). I have a text box NextMaintenace (date) where i calcute the date of the
next maintenace based on the date of the maintenace (MaintenaceDate)
difference between MachineHours, MaintenaceHours and WeeklyHourWork.
example:
if MachineHours=4000, MaintenaceHours=7000, MaintenaceDate=26-10-2007,
WeeklyHourWork=40
then
NextMaintenace=15-03-2009
This works fine but I need to put a limit to this MaintenaceDate so it can´t
be bigger than 1 year (365 days).
I've tried using IF-THEN-ELSE conditions but it didn't work very well.
Can somebody give me a clue how to do this?
Thanks in advance
I have a maintenace DB, i have the following fields MachineHours (long int),
MaintenaceHours (long int), MaintenaceDate (date) and WeeklyHourWork (long
int). I have a text box NextMaintenace (date) where i calcute the date of the
next maintenace based on the date of the maintenace (MaintenaceDate)
difference between MachineHours, MaintenaceHours and WeeklyHourWork.
example:
if MachineHours=4000, MaintenaceHours=7000, MaintenaceDate=26-10-2007,
WeeklyHourWork=40
then
NextMaintenace=15-03-2009
This works fine but I need to put a limit to this MaintenaceDate so it can´t
be bigger than 1 year (365 days).
I've tried using IF-THEN-ELSE conditions but it didn't work very well.
Can somebody give me a clue how to do this?
Thanks in advance