on 10-10-2008 7:34 PM
Here we go again.. I hate working with old IBM Data. I have a filed it is a string this time, that stores the date it is 6 long to handle 235959 = 11:25:59 pm. however sometime as in now it has a value of 63123 = 6:31:23am i have the following equation:
stringvar a:=totext({TAGDTL.CREATION_TIME},0,'');
numbervar h:= tonumber ( a [1 to 2] );
numbervar mm:= tonumber ( a [3 to 4] );
time(h, mm, 0)
this works great as long as I have all 6 field filled. When I do not then the example of 63123(6:30:23am)
comes in and the h in time = 63 and I get an error.
Any suggestions would be appricated...
Jim
James,
Try putting it in a control statement based on the length of the string. For example;
If length() = 5 then h[1] else h[1 to 2]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.