General discussion

  • Creator
    Topic
  • #2347186

    rolling number in Word 2002

    Locked

    by adelhier ·

    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.

All Comments

  • Author
    Replies
    • #3618184

      rolling number in Word 2002

      by dklippert ·

      In reply to rolling number in Word 2002

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

      (Brackets are inserted using Ctrl+F9)

      • #3617899

        rolling number in Word 2002

        by adelhier ·

        In reply to rolling number in Word 2002

        Thank you for the helping this will get my doc out to the work force.

    • #3618146

      rolling number in Word 2002

      by seagull data services ·

      In reply to rolling number in Word 2002

      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

      • #3618145

        rolling number in Word 2002

        by seagull data services ·

        In reply to rolling number in Word 2002

        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.

      • #3617898

        rolling number in Word 2002

        by adelhier ·

        In reply to rolling number in Word 2002

        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

    • #3617897

      rolling number in Word 2002

      by adelhier ·

      In reply to rolling number in Word 2002

      This question was closed by the author

Viewing 2 reply threads