October 3, 200421 yr I need to parse this line of text with script maker into different fields. Text: 9/30/2004|6:59:35 PM|Test Co.|Test Co. 111 to Date = 9/30/2004 Time =6:59:35 PM text1 = Test Co. text2 = Test Co. 111 I used pipes "|" instead of the return character (for separators) as I thought it may interferer with the data in some the fields that may have returns. Thanks FM7
October 4, 200421 yr You don't need script you need calcaulations! Using the field Input for your original text the calcaulations are: Date = GetAsDate ( Left( Input ; Position ( Input ; "|" ; 1 ; 1 ) - 1)) Time = GetAsTime ( Middle ( Input ; Position ( Input ; "|" ; 1 ; 1 ) + 1 ; Position ( Input ; "|" ; 1 ; 2 ) - Position ( Input ; "|" ; 1 ; 1 ) - 1 ) ) Text1 = Middle ( Input ; Position ( Input ; "|" ; 1 ; 2 ) + 1 ; Position ( Input ; "|" ; 1 ; 3 ) - Position ( Input ; "|" ; 1 ; 2 ) - 1 ) Text2 = Right ( Input ; Length ( Input ) - Position ( Input ; "|" ; 1 ; 3 )) Make sure the calculations are the correct type.
October 4, 200421 yr You might check out this Forum Thread, it is concerning custom functions but the technique works very well.
Create an account or sign in to comment