Jan 2, 2007 #1 neskin Programmer Mar 13, 2002 104 AU Hi, I have a string field '2300 - 0559' .How to display in crystal xi 2300 - 0600 thank you in advance nat
Hi, I have a string field '2300 - 0559' .How to display in crystal xi 2300 - 0600 thank you in advance nat
Jan 3, 2007 #2 Madawc Programmer Sep 5, 2002 7,628 GB For the string you give, you could get the desired result with Code: Left({field}, 6) & ToText(Truncate(ToNumber(Right({field}, 4), -2)) This separates the last four characters, turns them into a number and then truncates them to the nearest hundred. It helps to give your Crystal version. Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 Upvote 0 Downvote
For the string you give, you could get the desired result with Code: Left({field}, 6) & ToText(Truncate(ToNumber(Right({field}, 4), -2)) This separates the last four characters, turns them into a number and then truncates them to the nearest hundred. It helps to give your Crystal version. Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10
Jan 3, 2007 #3 lbass Technical User Feb 9, 2002 32,818 US Try: Left({table.field}, 7) + ToText(-int(-val(right({table.field},4))/100)*100,"0000") -LB Upvote 0 Downvote