D
djs35
Guest
Hi,
I am relatively new to the programming end of things, and had a question (how to do something) that I have not been able to figure out.
I have a table called "MaintenanceTbl". In the table, there are two fields called "StartTime" and "StopTime". Each fields stores a date and time. I created a form using access wizard, that allows me to store start and stop times (and even I figured out how to get it to load the start time automatically, and the stop when I press a button). However, I cannot figure out how to get it to place the difference in time (minutes) in another field called "DiffTime". I tried the following query:
select datediff(minute,NT1.StartTime, NT2.StopTime) as DiffTime from
(select min(time) as StartTime from MaintenanceTBL where msg='start') NT1,
(select max(time) as StopTime from MaintenanceTBL where msg='stop') NT2
But, this does not work. Any advice?
I am relatively new to the programming end of things, and had a question (how to do something) that I have not been able to figure out.
I have a table called "MaintenanceTbl". In the table, there are two fields called "StartTime" and "StopTime". Each fields stores a date and time. I created a form using access wizard, that allows me to store start and stop times (and even I figured out how to get it to load the start time automatically, and the stop when I press a button). However, I cannot figure out how to get it to place the difference in time (minutes) in another field called "DiffTime". I tried the following query:
select datediff(minute,NT1.StartTime, NT2.StopTime) as DiffTime from
(select min(time) as StartTime from MaintenanceTBL where msg='start') NT1,
(select max(time) as StopTime from MaintenanceTBL where msg='stop') NT2
But, this does not work. Any advice?