View Full Version : Calculation within a query!?!?


Cassper
06-27-2003, 11:13 AM
I have created a database for a hotel, and within it i need to be able to enter a particular date within a query, and it tells me what rooms are being vacated that day. I have an arrival date field and no. of nights field, so i guess there must be a way of performing a calculation, but i have no idea how to do it?!?!
Is there any one out there that knows how?!?!? If you can help, i would be really greatful!! :)

Jewellissa
06-27-2003, 11:46 AM
Try looking at Expression Builder button. It looks like a magick wand with sparks coming out of it. It has lots of useful calculation things. You can get at fields from here w/o misspellings. ;)

I particularly suggest
Functions -> Built-In Function -> Date/Time -> DateAdd

DateAdd takes a period of time to add, number of periods, and a date

Periods of time are "d" "ww" "m" or "y".. guess what they mean...

DateAdd("d", 30, 6/5/03) == 7/5/03

Jewelz