Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2006
    Location
    New England
    Posts
    12

    Unanswered: Format with spaces and colons

    Hi,

    I have a field I need to format by adding 3 leading spaces, and adding colons as every 3rd character.

    I have tried FORMAT(' 00:00:00:00:00:00, [Field]). but I was having problems with the alphanumeric fields not converting

    The original field looks like 000d75d7833d and then the converted would be;

    ' 00:0d:757:83:3d'

    Any help would be greatly appreciated

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Try:

    Format([Field]," @@:@@:@@:@@:@@:@@")
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    Jan 2006
    Location
    New England
    Posts
    12
    Thanks for your help StarTrekker! -- worked perfectly

  4. #4
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    You're most welcome
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  5. #5
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Good one ST.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

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