Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-20-2019, 08:29 PM
wcngu1 wcngu1 is offline Default How to automatically Calculate number of days between two dates? Windows 10 Default How to automatically Calculate number of days between two dates? Office 2016
Novice
Default How to automatically Calculate number of days between two dates?
 
Join Date: Nov 2016
Posts: 4
wcngu1 is on a distinguished road
Default Default How to automatically Calculate number of days between two dates?

Hi guys! I have a possibly basic question....



I Have attached a word doc showing two date boxes. First box showing the starting day of a shift and the second is the last day of the shift. I'm hoping to automate
the counting of the number of days worked.

Is this easy to do? Unfortunately it has to be done in word or PDF and not excel.

Would love any advice thanks in advance!
Attached Files
File Type: docx Date testing.docx (25.0 KB, 8 views)
Reply With Quote
  #2  
Old 10-21-2019, 12:42 AM
gmayor's Avatar
gmayor gmayor is offline Default How to automatically Calculate number of days between two dates? Windows 10 Default How to automatically Calculate number of days between two dates? Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

It is easy enough to do in Word - create a new document from the attached template and click in the 'Days' field. If you want PDF, save the resulting file as PDF.
Attached Files
File Type: dotm Date testing.dotm (35.3 KB, 13 views)
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #3  
Old 10-21-2019, 12:01 PM
Charles Kenyon Charles Kenyon is online now Default How to automatically Calculate number of days between two dates? Windows 10 Default How to automatically Calculate number of days between two dates? Office 2016
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,070
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

For much more on date fields, see Paul Edstein's document.
Microsoft Word Date Calculation Tutorial
Reply With Quote
  #4  
Old 10-24-2019, 02:23 AM
wcngu1 wcngu1 is offline Default How to automatically Calculate number of days between two dates? Windows 10 Default How to automatically Calculate number of days between two dates? Office 2016
Novice
Default How to automatically Calculate number of days between two dates?
 
Join Date: Nov 2016
Posts: 4
wcngu1 is on a distinguished road
Default

Quote:
Originally Posted by gmayor View Post
It is easy enough to do in Word - create a new document from the attached template and click in the 'Days' field. If you want PDF, save the resulting file as PDF.
Thanks Gmayor this worked a treat! The hilarious thing is that it worked on my person computer at home but my work computer has blocked ALL macros and I cannot even turn them on in settings/options. Arrgh!
Reply With Quote
  #5  
Old 10-24-2019, 02:24 AM
wcngu1 wcngu1 is offline Default How to automatically Calculate number of days between two dates? Windows 10 Default How to automatically Calculate number of days between two dates? Office 2016
Novice
Default How to automatically Calculate number of days between two dates?
 
Join Date: Nov 2016
Posts: 4
wcngu1 is on a distinguished road
Default

Quote:
Originally Posted by Charles Kenyon View Post
For much more on date fields, see Paul Edstein's document.
Microsoft Word Date Calculation Tutorial
Thanks Charles,

It looks like its all kinda hopeless since my work organisation has blocked all macros.

May need to go to Adobe acrobat instead =/
Reply With Quote
  #6  
Old 10-24-2019, 04:18 AM
Charles Kenyon Charles Kenyon is online now Default How to automatically Calculate number of days between two dates? Windows 10 Default How to automatically Calculate number of days between two dates? Office 2016
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,070
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

You do not need to run macros to use that. Just copy and paste fields.
The macro is only needed if you need to change the date format.
Do you do dates as October 24, 2019, or as 24 October 2019?
Reply With Quote
  #7  
Old 10-24-2019, 04:20 AM
gmayor's Avatar
gmayor gmayor is offline Default How to automatically Calculate number of days between two dates? Windows 10 Default How to automatically Calculate number of days between two dates? Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Adobe Acrobat isn't going to help. However Paul's Date Calculations document does have a solution on Page 10. It is a clever solution, if not as convenient to the user as content controls and macros, but it does still work and calculates the difference when you tab out of the end date field..
Attached Files
File Type: docx Dates.docx (16.5 KB, 8 views)
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculate amount of days per month from a given timerange Yde1203 Excel 3 05-02-2019 08:13 PM
Calculate number of days in a table from a specific date tstolbert Word 2 06-25-2016 02:30 PM
Default How to automatically Calculate number of days between two dates? Formula To Calculate Countdown Days To Project Completion Catherine Project 1 02-19-2014 11:15 AM
Default How to automatically Calculate number of days between two dates? Calculate difference by days and hours alysolyman Excel 6 05-13-2013 02:19 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:09 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft