excel formula for dates in access

G

Guest

hi I am trying to import my spreadsheet into my database. How do I keep the
same functions being performed in access. the current formula adds days to a
start date depending on whether the second column says weekly, monthly, or
annual to determine the end date.

=IF(B1="weekly",A1+7,IF(B1="monthly",A1+30,IF(B1="annual",A1+365,"")))
my table would look similar to this
title | edition | effective date | period | destroy date
XXX A 1 jan weekly 8 jan
B 1 mar 07 monthly 1 apr 08


The Title may have several editions with different dates to calculate. thanks
 
G

Guest

You don't need to store calculated dates (unless you stay in Excel). In
Access, you can use a query to display calculated values. Also, are you sure
you want to add 30 or 365 days when months and years can vary? Access/vba has
a DateAdd() function that is more accurate.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top