Calculations

  • Thread starter Thread starter bsando
  • Start date Start date
B

bsando

I am trying to calculate 2 labels both are date and time labels.
do I use a bookmark or create another label or textbox? and I am no
too sure about the code.

Thank
 
Please give us a bit more explanation of what you are trying to do. There's
no doubt that a calculation can be done with dates and times, but we need
more details to provide the right information.

--
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
 
OK.

I have two labels (Label1 - Start date, Label2 - end date).

On clicking these labels the date and time in automatically entered a
a bookmark, That way no matter where the cursor is on the screen i
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 wil
automatically give the difference in time either in days, hours o
minutes.

I hope this helps.

Thanks agai
 
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
 
Back
Top