Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2006

Tip: Looking for answers? Try searching our database.

How do I calculate the number of days between 2 dates

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
UNI-SOURCE Office User - 31 Jan 2006 12:47 GMT
I have a date and need to know the number of days between that date and the
current date to be included in my word document.
Dave Lett - 31 Jan 2006 13:09 GMT
Hi,
You can use the DateDiff function, as in the following example:

Dim dFirstDate As Date
dFirstDate = "1/1/06"
MsgBox DateDiff("d", dFirstDate, Date)

HTH,
Dave

> I have a date and need to know the number of days between that date and the
> current date to be included in my word document.
UNI-SOURCE Office User - 31 Jan 2006 13:35 GMT
OK, maybe I put it in the wrong category.  I have to make this a user
function of setting up the word templete(word document for mail
merge.....maybe wrong term).  I am not aware of how I include VB code in it,
but maybe I can.  If I can please explain

> Hi,
> You can use the DateDiff function, as in the following example:
[quoted text clipped - 8 lines]
> > I have a date and need to know the number of days between that date and the
> > current date to be included in my word document.
Dave Lett - 31 Jan 2006 14:25 GMT
Hi,

I really have no idea what you're asking. Are you setting up a word
template? Are you creating a mailmerge? Do you know? Is the user setting up a
template? Is the user setting up a document that they'll (mis)use as a
template? Do you simply want to include a field in a document/template that
will show the number of days between two dates (one of which is the current
date)?

Dave

> OK, maybe I put it in the wrong category.  I have to make this a user
> function of setting up the word templete(word document for mail
[quoted text clipped - 13 lines]
> > > I have a date and need to know the number of days between that date and the
> > > current date to be included in my word document.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.