Re: Calculations
From: Doug Robbins - Word MVP (dkr_at_NOmvpsSPAM.org)
Date: 04/22/04
- Next message: ChrisM: "Re: Word2002 shuts down on print command"
- Previous message: ChrisM: "Re: Find & Replace Question (To end of Line)"
- In reply to: bsando: "Re: Calculations"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 22 Apr 2004 19:11:59 +1000
Check out the DateDiff function in the Visual Basic Help File
Returns a Variant (Long) specifying the number of time intervals between two
specified dates.
Syntax
DateDiff(interval, date1, date2[, firstdayofweek[, firstweekofyear]])
The DateDiff function syntax has these named arguments:
interval. String expression that is the interval of time you use to
calculate the difference between date1 and date2.
date1, date2 Variant (Date). Two dates you want to use in the calculation.
The interval argument has these settings:
Setting Description
yyyy Year
q Quarter
m Month
d Day
ww Week
h Hour
n Minute
s Second
-- Please post any further questions or followup to the newsgroups for the benefit of others who may be interested. Unsolicited questions forwarded directly to me will only be answered on a paid consulting basis. Hope this helps Doug Robbins - Word MVP "bsando" <bsando.153lmf@nospam.WordForums.com> wrote in message news:bsando.153lmf@nospam.WordForums.com... > > OK. > > I have two labels (Label1 - Start date, Label2 - end date). > > On clicking these labels the date and time in automatically entered at > a bookmark, That way no matter where the cursor is on the screen it > will goto back to the bookmark and enter the date and time. > > What I want to do is have either a field or label etc that will > automatically give the difference in time either in days, hours or > minutes. > > I hope this helps. > > Thanks again > > > ------------------------------------------------ > ~~ Message posted from http://www.WordForums.com/
- Next message: ChrisM: "Re: Word2002 shuts down on print command"
- Previous message: ChrisM: "Re: Find & Replace Question (To end of Line)"
- In reply to: bsando: "Re: Calculations"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|