Results 1 to 2 of 2
  1. #1
    5 Star Lounger
    Join Date
    May 2001
    Location
    Philadelphia, Pennsylvania
    Posts
    676
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Date testing (2003)

    In my Access Fixed Asset database, I have a field "Date placed in service" in Date/Time format. I have another field with "Life in Months" as a number. I want to write a query that is going to list for me those assets that will have their final months of depreciation in this calendar year. The basic idea would be if the Date Placed in service + life in months will be less than the end of the current year, 12/31/06, then the asset would be fully depreciated in this year. But that would include all fully depreciated assets from all periods before the current year. So I would also need to say that the Date Placed in Service + life in months also has to be greater than 1/1/06, to identify those that still had time left at 12/31/05. Is this something Access can do? TYIA

  2. #2
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Vancouver, Br. Columbia, Canada
    Posts
    632
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date testing (2003)

    This returns all the items that will be fully depreciated in 2006 (I used different field names than you specified):


    SELECT DatePart("yyyy",DateAdd("m",[servicemonths],[dateplacedinservice])) AS ServiceEnd, Table1.DatePlacedInService, Table1.ServiceMonths
    FROM Table1
    WHERE (((DatePart("yyyy",DateAdd("m",[servicemonths],[dateplacedinservice])))=DatePart("yyyy",Date())));
    --------------------------------------------------
    Jack MacDonald
    Vancouver, Canada

Posting Permissions

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