In QTP, I am trying to split a string "May 06, 2011,5/6/2011 1:02:07 PM" where I want two spearate values as "May 06, 2011" and "5/6/2011 1:02:07 PM"
My code is splitting a string using "," as delimiter. But here there are two ",".
Can any one help me out in logic for such strings.
Temp = Split(Input_String,",")
Value_1 = Temp(0)
Value_2 = Temp(1) &Temp(2)
This is pretty much a logic question, not necessarily related to QTP or any language or tool for that matter...Tsk tsk!
No sense bein' a grifter if it's the same as being a citizen.
is this necessary to use split function? i.e. if input format is consistent. you can use mid function as well.
timestamp="May 06, 2011,5/6/2011 1:02:07 PM"
Not to pick nits but split removes the comma so you would need to do:
Value_1 = Temp(0) & "," & Temp(1)
Value_2 = Temp(2)
Enought from the peanut gallery.