Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    DateDiff question (Access2K, Win2KPro)

    I'm finishing up a project with an Entry Date on one form and a Discharge Date on a subform. In additon, there is a text box on the subform for entering the length of time in progem in terms of months and days. User has asked me to get the program to automatically determine this information -- reasonable enough. I can do the months between the dates with DateDiff("m", [INTAKE DATE], [DISCHARGE DATE]) but what about the days remaining? I have this solution:

    DateDiff("d", [INTAKE DATE], [DISCHARGE DATE]) MOD 30 to sortof find the days remaining but, obviously, this won't give an exact count. I'm pretty sure this isn't a real problem as the infor will be fed to a query for overall reporting of the time in terms of an average but I was wondering if there's a better solution out there -- perhaps a function -- that gives the exact days remaining. I'm being a bit of a perfectionist on this point but it'd be nice to get the remining days spot-on.

    TIA

    sps

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: DateDiff question (Access2K, Win2KPro)

    See for example the replies to <post#=187447>post 187447</post#> (in particular by MarkD)

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: DateDiff question (Access2K, Win2KPro)

    thanks - looks like it'll do the job.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •