Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

String functions

How to eliminate only first colon from below string .

: 23 - JUL - 16 06:00 PM

8 Replies
Chanty4u
MVP
MVP

try this

sam:

LOAD * INLINE [

    colon

    : 23 - JUL - 16 06:00 PM

];

LOAD *,

PurgeChar(colon,':') as new

Resident sam;

colo.PNG

Anonymous
Not applicable
Author

e.g. you can use

=mid(': 23 - JUL - 16 06:00 PM',2,len(': 23 - JUL - 16 06:00 PM')-1)

avinashelite

if the : position is always fixed then try like this

replace('-'&': 23 - JUL - 16 06:00 PM','-:','')


if its a field

replace('-'&field_name,'-:','')


Chanty4u
MVP
MVP

orelse

sam:

LOAD * INLINE [

    colon

    : 23 - JUL - 16 06:00 PM

];

LOAD *,

Right(colon,23) as result

//PurgeChar(colon,':') as new

Resident sam;

maxgro
MVP
MVP

I think you want to remove ': '


=right(': 23 - JUL - 16 06:00 PM', len(': 23 - JUL - 16 06:00 PM')-2)

or

=subfield(': 23 - JUL - 16 06:00 PM', ': ', 2)


yasmeenk
Partner - Creator
Partner - Creator

Try this,

=subfield(': 23 - JUL - 16 06:00 PM', ': ', 2)

community1.PNG

MarcoWedel

Mid(string,3)

or

Replace(string,': ','')

hope this helps

regards

Marco

pk2019
Partner - Contributor III
Partner - Contributor III

Hi Snehal,

You need to use the following function in Data Load Editor:

Purgechar(YourDateTimefield, ':')