ill explain it different

tubar

Registered User.
Local time
Today, 11:00
Joined
Jul 13, 2006
Messages
190
I have a light bulb table. It lists all the lights used. One of the fields is (rated life in hours)
I have a location table. This lists all the locations and fixtures and date relamped. So lets say I have a hall and it has regular 100 wat lamp in it. I have a querry combining the tables. I want to take that HALL FIXTURE RELAMP DATE and add the RATED LIFE IN HOURS TO IT

So if the halls 100watt light was relamped 12-12-08 then next relamp field should automatically compute 3-28-11 as the next relamp (taking the rated hours and adding to relamp date)…I can do this no problem…what I can no longer do is have the user type in say march2009-april2009 and see what needs to be relamaped…any ideas
 
You would have to pass real dates to the query. If you want the user to be able to type text in like that, you'll need to interpret it back to dates that the query can use:

3/1/09
4/30/09

Given the differences in how different people might type things, it could get complicated. I would just have them type in the dates, perhaps with the assistance of a date picker.
 
Dates are stored as numbers with the integer part being days (with zero being 31 December 1899) and the fractional part as hours and seconds. So if you take your rated hours value and divide by 24, you can add this to the date to get your new date. Do this in a query and you can add your user dates as a criterion to select the relevant lamps.

I sure you know this, but don't you need to take into account the burning hours per day, unless your lamps are lit 24/7?
 

Users who are viewing this thread

Back
Top Bottom