90 days and the first of the month

  • Thread starter Gaetan via AccessMonster.com
  • Start date
G

Gaetan via AccessMonster.com

I'm trying to figure out hoe to calculate 90 days from hire and the first
of the month

Example:

HiredDate Insurance activated

1/3/2010 4/1/2010 That is 90 days and the
following 1st of the month

Exception to the Rule:

1/1/2010 3/1/2010 If hired on the first its just
HiredDate +90


All I came up with for my query is

INSsurance: DateAdd("m",3,[DateHired]-Day([DateHired])+1)

Any assistance wiuld greatly be appreciated

Thanks


G
 
J

John W. Vinson

I'm trying to figure out hoe to calculate 90 days from hire and the first
of the month

Example:

HiredDate Insurance activated

1/3/2010 4/1/2010 That is 90 days and the
following 1st of the month

Exception to the Rule:

1/1/2010 3/1/2010 If hired on the first its just
HiredDate +90


All I came up with for my query is

INSsurance: DateAdd("m",3,[DateHired]-Day([DateHired])+1)

Any assistance wiuld greatly be appreciated

Thanks


G

Try

DateSerial(Year([HiredDate]), Month([HiredDate])+IIF(Day([HiredDate]=1,3,4),1)

This will get *three months* which is not necessarily equal to 90 days.
 
G

Gaetan via AccessMonster.com

Thanks for the reply

I'm getting an error message on the following query.

90days from hire:DateSerial(Year([HiredDate]), Month([HiredDate])+IIF(Day(
[HiredDate]=1,3,4),1)

The error message is: The expression you have enterd has a function
containing the wrong
number of arguments.

Any Ideas

Gaetan
I'm trying to figure out hoe to calculate 90 days from hire and the first
of the month
[quoted text clipped - 20 lines]

Try

DateSerial(Year([HiredDate]), Month([HiredDate])+IIF(Day([HiredDate]=1,3,4),1)

This will get *three months* which is not necessarily equal to 90 days.
 
J

John Spencer

Missing a closing parenthesis in the Day(HiredDate) call

DateSerial(Year([HiredDate]), Month([HiredDate])+
IIF(Day([HiredDate])=1,3,4),1)


John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
Thanks for the reply

I'm getting an error message on the following query.

90days from hire:DateSerial(Year([HiredDate]), Month([HiredDate])+IIF(Day(
[HiredDate]=1,3,4),1)

The error message is: The expression you have enterd has a function
containing the wrong
number of arguments.

Any Ideas

Gaetan
I'm trying to figure out hoe to calculate 90 days from hire and the first
of the month
[quoted text clipped - 20 lines]
Try

DateSerial(Year([HiredDate]), Month([HiredDate])+IIF(Day([HiredDate]=1,3,4),1)

This will get *three months* which is not necessarily equal to 90 days.
 
G

Gaetan via AccessMonster.com

John

Thanks That worked Great!!

John said:
Missing a closing parenthesis in the Day(HiredDate) call

DateSerial(Year([HiredDate]), Month([HiredDate])+
IIF(Day([HiredDate])=1,3,4),1)

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
Thanks for the reply
[quoted text clipped - 20 lines]
 

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