Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

time display

Status
Not open for further replies.

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
 
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.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Try:

Left({table.field}, 7) + ToText(-int(-val(right({table.field},4))/100)*100,"0000")

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top