« Previous Next »

Thread: can i create leading zeros?

Last post 01-18-2008 5:00 AM by squadjot. 4 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (5 items)

Sort Posts:

  • 01-12-2008, 1:58 AM

    • squadjot
    • Not Ranked
    • Joined on 12-29-2007, 7:48 PM
    • Posts 5

    can i create leading zeros?

    HI

    I need help to figure out how to add 2 leading zeros infront of some numbers i'm collecting with LP.
    001
    002
    003
    etc
    ...
    054
    055
    056
    etc

    (the numbers do not have leading zeros when they are being read, so -dtLines:0 wont help me)

    Does anyone have an example.. or just a little pointer where to look/begin?...

    Thx

  • 01-17-2008, 12:15 AM In reply to

    Re: can i create leading zeros?

    Hi, 

    Try using STRCAT, like this: STRCAT( '0', numbers )

    Zhao Ji Ma
    Sincerely,
    Microsoft Online Community Support

    “Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”
  • 01-17-2008, 9:20 AM In reply to

    • squadjot
    • Not Ranked
    • Joined on 12-29-2007, 7:48 PM
    • Posts 5

    Re: can i create leading zeros?

    Yes, I know that, it was more how syntax-wise to make the IF statement.. i'm not sure how exactly to put it up.
    It must be something about asking how long the string is (of number), and accordingly adding needed zeros..

     
    It's more like..  how? :)

  • 01-18-2008, 1:15 AM In reply to

    Re: can i create leading zeros?

    Hi,

    Based on my understanding, you can use strlen and where claus, for example:

    where strlen(field) = 4

    Zhao Ji Ma
    Sincerely,
    Microsoft Online Community Support

    “Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”
  • 01-18-2008, 5:00 AM In reply to

    • squadjot
    • Not Ranked
    • Joined on 12-29-2007, 7:48 PM
    • Posts 5

    Re: can i create leading zeros?

    I liked the old logparser forum better =(

     

Page 1 of 1 (5 items)
Microsoft Communities