raymanj Posted October 3, 2004 Posted October 3, 2004 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
RalphL Posted October 4, 2004 Posted October 4, 2004 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.
rogermax Posted October 4, 2004 Posted October 4, 2004 You might check out this Forum Thread, it is concerning custom functions but the technique works very well.
Recommended Posts
This topic is 7358 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now