View Single Post
  #2  
Old May 19th, 2010, 02:21 AM posted to microsoft.public.access.queries
John W. Vinson
external usenet poster
 
Posts: 18,261
Default 90 days and the first of the month

On Tue, 18 May 2010 20:33:47 GMT, "Gaetan via AccessMonster.com" u49408@uwe
wrote:

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.
--

John W. Vinson [MVP]