Discussion Locked

rolling number in Word 2002

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I would like to use the time (HH:MM:SS) and date (mm/dd/yy) add them together to come up with a rolling number that is changing and that there is a very small chance that there could be duplicates.

If some one now the code lay out that would be great or a tool in word I could use.

6 replies

by dklippert

As a field in the document:
{TIME \@ "MMddyyhhmmss"}

(Brackets are inserted using Ctrl+F9)

by seagull data services

Not sure about word but for vb in general date and time it treated as a double precision decimal point number
There's a CDBL function which will convert any numeric value, including dates, into a double.
example
dim rollingnumber as double
rollingnumber = cdbl(now)
Hope this helps
John

by seagull data services

Forgot to mention
The date is the part of the number to the left of the decimal point and time is the fractional part. Time is represented as a fraction of a day.

by adelhier

Thank you for giveing an answer, but I found that the first person had one that was alittle ez'er to use.

As a field in the document:
{TIME \@ "MMddyyhhmmss"}

(Brackets are inserted using Ctrl+F9)

This is what he gave my.
I will also try your answer also

This discussion is closed to new replies.