Results 1 to 4 of 4
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Substituite blank (2000 sr 1)

    i take from string in a text file this variable var_DIP = Mid(riga, 2, 5).
    The value prsent in text file is 01 02 (5 charachetrs and a blank)
    Is possible during the import to substuituite the blank with ":" ...

  2. #2
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Vienna, Wien, Austria
    Posts
    5,009
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Substituite blank (2000 sr 1)

    In code that would be

    Mid(riga, 2, 2) & ":" & Mid(riga, 5,2)

    HTH
    Gre

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Substituite blank (2000 sr 1)

    oh, oh ....
    Is also possible during the import of string a null value, in this case assign to the default 00:00...
    How do it?
    Example:

    08 15
    13 40

    14 40
    16 45
    14 40
    16 45

    14 40
    16 45

  4. #4
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Substituite blank (2000 sr 1)

    Something like this?
    if trim(Mid(riga, 2, 2) & Mid(riga, 5,2))="" then
    sValue = "00:00"
    else
    sValue = Mid(riga, 2, 2) & ":" & Mid(riga, 5,2)
    endif

    Of course instead of sValue you could put directly into a cell if desired

    Steve

Posting Permissions

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