Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count up clock from a specified date

Status
Not open for further replies.

IanTatsevers

Technical User
Feb 27, 2014
1
0
0
GB
Hi,

I'm trying to set up a presentation in Word 2010 that shows the number for days since the last accident / incident occurred but have no idea how to set it up. I realise that I will have to reference the number to the date of the last accident but how do I get it to then count up for every day after the accident & display that in the presentation?

Example: date of last incident: 24/02/14 therefore presentation show read Number of Days Since last Accident 3, ad-infinitum.

Any help would be appreciated thanks
 
If you are willing to use VBA, you can do that:

Code:
MsgBox DateDiff("d", CDate("24/02/2014"), Date) & " Days ago"

You are going to get a message box saying: 3 Days ago.

Have fun.

---- Andy
 
Simple if you embed excel table. Dates are numbers, so if you have proper date in A1, you can use in B1 formula: ="Days Since last Accident: "&(TODAY()-A1)
Worksheet requires recalculation if you need to update it. If no (report for specific date, you can use (still in excel) DATE(year, month, day) instead of today. Excel data can be pasted as excel object or formatted text. Mind that in the first case whole workbook is embedded.

combo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top