Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 bekahbeets
		
			bekahbeets
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hey I am looking to separate out a string like this:
'3/16/2017,3/17/2017'
So that i can grab the beginning date : 3/16/2017
and the ending date: 3/17/2017
How do I do this in qliksense Set analysis formula?
I normally have used an indexof to get the comma location and then locate the substring before it to get the startdate, but I am not finding an equivalent in qliksense?
 
					
				
		
$(=index('3/16/2017,3/17/2017',','))
but what do you want to achieve with that?
 
					
				
		
$(=index('3/16/2017,3/17/2017',','))
but what do you want to achieve with that?
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You want to do this on the front end or the backend? I would think that doing this in the backend would make sense or I am not sure I understand what you are looking to do... can you provide more details
 marcus_malinow
		
			marcus_malinow
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Rebekah,
I'd suggest doing this in your data model rather than in the front end. This will result in a more flexible solution.
The syntax would be
Subfield([FieldName], ', ', 1) for the first part
or Subfield([FieldName], ', ', 2) for the second
Marcus
 
					
				
		
... but I would recommend doing this at script level... I never used it in the frontend like that...
 
					
				
		
 bekahbeets
		
			bekahbeets
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I normally have done something like substring('string1,string2', 0, indexOf(',')) to get the string1, but i think qliksense's subfield() will do the same thing
 
					
				
		
 bekahbeets
		
			bekahbeets
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		the range is set on the front end so i have to work with the range on the front end.
 
					
				
		
 bekahbeets
		
			bekahbeets
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		That is perfect and the actual end goal I am trying to acheive! Thank you!
