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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need a function that replace character 1

Status
Not open for further replies.

EKC

Technical User
Jan 13, 2001
43
0
0
CA
Hi,
I have a numeric field that need to be converted to time - actually this field show time ex. 15.45 is 15:45.Is there a function that can do this and if not is there a function that can replace a "." with ":"
Ex. Fun(15.45) should return 15:45

Thanks in advance
Lyn
 
This should do the trick.
ALLTRIM(STR(INT(yournumber))) + ":" + ALLTRIM(STR((yournumber-INT(yournumber))*100))
 
Try this:

FUNCTION ConvertToCharTime()
LPara nNum
RETURN strtran(str(nNum,5,2),".",":")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top