# Calulation for date range..assigning custom values based on variables

Question asked by jl2012 on Mar 6, 2014
Latest reply on Mar 17, 2014 by philmodjunk

### Title

Calulation for date range..assigning custom values based on variables

### Post

Hello All,

So I have been thinking on this one for some time and thought I would consult the forum brain.  I have a rental database that I would like to automate.  I have different prices for different days of the week as well as different times of the year.  Here is a list of the prices:

November-February & August - Sunday-Thursday = \$160.00 per night

November-February & August - Friday-Saturday = \$195.00 per night

November-February & August - Weekly Stays = \$1150.00 per week

March-October - Sunday-Thursday = \$190.00 per night

March-October - Friday-Saturday = \$225.00 per night

March-October - Weekly Stays = \$1350.00 per week

In my database I have a DateStart field and a DateEnd field.  I would love to create a calculation that would evaluate the date range and assign the proper prices to each night stayed.  For example:

DateStart = 02/13/2014

DateEnd = 02/18/2014