Results 1 to 3 of 3

Thread: Format function and Now

  1. #1
    Guest

    Here is the piece of code acting strange.

    ID = format(Now,"mmddyyyyhhnnss") + strCompName

    On a few machines, I found that the ID is being computed as
    mmddyyyyhhnnX + ComputerName
    where X is some unrelated single digit number.

    On 80% of the machines(about 50 or so) it runs fine.
    Could someone let me know if its a dll problem that i need to fix .
    Thanks.


  2. #2
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238

    Lightbulb Regional setting

    May be you can check the regional setting whether set correctly?

  3. #3
    Addicted Member jcouture100's Avatar
    Join Date
    Aug 1999
    Posts
    141
    I would also suggest using the Ampersand "&" to concatinate your string to make sure no math operation is being performed.

    Code:
    ID = format(Now,"mmddyyyyhhnnss") & strCompName
    JC

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width