Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / December 2005

Tip: Looking for answers? Try searching our database.

formula

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
alish - 30 Nov 2005 15:12 GMT
Hi all,

I would appreciate if you help me out on this case here. I am having problem
in calculating 30 days calculation here. An employe is entitled to take one
sick day each 30 days. For example by today he rates 11 sick days starting
the day he is hired by the company. The hired date is 12/20/2004 and today is
11/30/2005. I put the formula MONTHS: "(Now()-[CONTRACT DATE])/30". It is
giving me 11.5. How can i make it to give 11? I tried to round it and it came
up with 12, well it is obvious. Please advice.

Al
Allen Browne - 30 Nov 2005 15:29 GMT
Int() will drop the fractional part:

   Int(DateDiff("d", [CONTRACT DATE], Date()) /30)

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> I would appreciate if you help me out on this case here. I am having
> problem
[quoted text clipped - 9 lines]
>
> Al
alish - 01 Dec 2005 08:01 GMT
Thanks Allen, that's what I wanted. Appreciate your help.

Al

> Int() will drop the fractional part:
>
[quoted text clipped - 13 lines]
> >
> > Al
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.