Results 1 to 6 of 6
  1. #1
    fuecheefang is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2015
    Posts
    43

    Cant Use =DateDiff("d",Date(),[Revised Date]) in table???

    trying to add a calculated field into my table with this expression =DateDiff("d",Date(),[Revised Date]), but Access will not allow me to add this expression into the Calculated field. Any recommendations on how to achieve this in my table. I am trying to populate a Master Days (number of days difference) field with two dates, a Revised date - Todays current date= Master days. Please help.

  2. #2
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    what do you need this value for? Is it just workdays you want calculated? or all days?

  3. #3
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    You don't need to keep the calculated field in the table at all - use a query instead when you need the difference value. IMO, calculated fields are an abomination from Microsoft, and as you have found out, they are very limited in the expressions you can use for them.

  4. #4
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    John, could you look here please? https://www.accessforums.net/queries...ery-55942.html

  5. #5
    fuecheefang is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2015
    Posts
    43
    Quote Originally Posted by John_G View Post
    You don't need to keep the calculated field in the table at all - use a query instead when you need the difference value. IMO, calculated fields are an abomination from Microsoft, and as you have found out, they are very limited in the expressions you can use for them.
    Thanks Homegrownandy and John_G,

    I skipped adding the Calculated Field in the table and instead utilized the expression in a Query. Much easier, thanks for the advice all.

    *SOLVED*

  6. #6
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    no worries, there are some modules online that will look only for workdays. That's what I use. If you want it let me know and ill see where I got it from.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 02-16-2015, 01:04 PM
  2. Replies: 3
    Last Post: 12-06-2014, 03:59 AM
  3. Replies: 15
    Last Post: 05-27-2014, 10:00 PM
  4. Replies: 2
    Last Post: 09-29-2012, 11:22 PM
  5. Replies: 4
    Last Post: 03-14-2012, 09:05 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums