Loop through a string in PowerBuilder -
first of all, i'm noob @ powerbuilder , can't seem find how anywhere.
i have been give task of rewriting application @ work. boss wants new application mimic old 1 as possible, leads question. there date field allow date input separated tilde (01/01/15~01/31/15) , uses beginning date , end date between sql statement.
with being said, trying same thing in powerbuilder 12.6 classic. know can accomplish same thing using 2 date pickers (begin date , end date), boss wants transition seamless possible end users.
i have sle_date_shipped on form takes in date format of mm/dd/yy , process it, want allow mm/dd/yy~mm/dd/yy , parse out begin , end date. pseudo code this:
int string s string start_date string end_date if this.textsize > 8 s = this.text(value of position in string) start_date = s + s if this.text = "~" s = s + 1 s = this.text(value of position in string) end_date = s + s end if this.textsize + 1 else start_date = this.text end if
i realize pseudo code needs work, i'm trying point across.
thanks
don't loop...
string ls_start, ls_end ls_start = left( this.text, pos( this.text, '~' ) - 1) ls_end = right( this.text, len( this.text) - pos( this.text, '~'))
-paul horan-
Comments
Post a Comment