Results 1 to 5 of 5

Thread: Format Function Right To Left

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2000
    Location
    Brooklyn NY USA
    Posts
    1,258

    Resolved Format Function Right To Left

    When I run the following

    VB Code:
    1. Print Format("98765432111","(###) ###-####")

    The answer is :

    (9876) 543-2111

    I want it to return:

    (987) 654-32111

    Is there any way to do it?

    Please help.

    Thanks.
    Last edited by shragel; Nov 21st, 2004 at 07:25 PM.

  2. #2
    Frenzied Member David.Poundall's Avatar
    Join Date
    Sep 2002
    Location
    Robin Hood Land
    Posts
    1,457
    Try
    VB Code:
    1. Print Format("98765432111","(000) 000-0000")
    David

    Learn the Rules so that you know how to break them properly.

    Printing dll dBTools MZTools Winsock API WinsockVB More Winsock SGrid2 MSChart Mail2Web

    If you have found this thread useful then read this

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2000
    Location
    Brooklyn NY USA
    Posts
    1,258
    Figured it out myself.

    Thanks for trying

    VB Code:
    1. Format("98765432111","!(@@@) @@@-@@@@ @@@@@@@@")

  4. #4
    Frenzied Member David.Poundall's Avatar
    Join Date
    Sep 2002
    Location
    Robin Hood Land
    Posts
    1,457
    No probs - thanks for the answer - I have learned something myself there.
    David

    Learn the Rules so that you know how to break them properly.

    Printing dll dBTools MZTools Winsock API WinsockVB More Winsock SGrid2 MSChart Mail2Web

    If you have found this thread useful then read this

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2000
    Location
    Brooklyn NY USA
    Posts
    1,258
    The exclamation mark does the trick.

    But it seems to work only with the @ placeholder.

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