Re: date - # of days calcuation



On Mon, 6 Jun 2005 15:35:32 -0700, Donna wrote:

> I have a table that has a field for a begin date & a field for an end date.
> A person may check into the shelter on 6/15 and leave on 7/15, for example.
> The problem is I need to figure out how many days we supplied overnight
> housing for people for the month of JUNE only. Can I do that with just these
> 2 fields, or should I redesign the database to put some other field in there?

If I understand you correctly, you wish to know how many days between
6/15 and the end of that month.

Exp:DateDiff("d",[DateField],DateSerial(Year([DateField]),Month([DateField])+1,0))

For 6/15 the answer is 15.

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.



Relevant Pages

  • Re: EXPRESSIONS
    ... >> Am I remotely close with my expressions? ... > Please only reply to this newsgroup. ... > I do not reply to personal email. ... Prev by Date: ...
    (microsoft.public.access.queries)
  • Re: First Page Exists!!!
    ... Do you wish to hide a control only on the first page? ... Please only reply to this newsgroup. ... I do not reply to personal email. ... Prev by Date: ...
    (microsoft.public.access.reports)
  • Re: Control property .visible and .enabled
    ... > If the field dateandtimevl is empty the control is still locked. ... Please only reply to this newsgroup. ... I do not reply to personal email. ... Prev by Date: ...
    (microsoft.public.access.formscoding)
  • Re: from what pull-down menu can I get to the relationships screen?
    ... > "relationships" on any of the pulldown menus. ... Please only reply to this newsgroup. ... I do not reply to personal email. ... Prev by Date: ...
    (microsoft.public.access.gettingstarted)
  • Re: How to list atributes of all tables in Query Analyzer
    ... > Hi newsgroup ... > I need to know the properties of all tables in a given database on MSSQL ... Prev by Date: ...
    (microsoft.public.sqlserver.clients)