Hello all I need to conver the number to time numbers can be of format 163,321.00 or 93,429.00
I did this
FORMULA FOR “@PHPTCR”
if tonumber({PHPICK00.PHPTCR})<100
then "0000"+ totext(tonumber({PHPICK00.PHPTCR}))else if
tonumber({PHPICK00.PHPTCR})<1000
then "000"+ totext(tonumber({PHPICK00.PHPTCR}))else if
tonumber({PHPICK00.PHPTCR})<10000
then "00"+ totext(tonumber({PHPICK00.PHPTCR}))else if
tonumber({PHPICK00.PHPTCR})<100000
then "0"+ totext(tonumber({PHPICK00.PHPTCR}))
else totext({PHPICK00.PHPTCR})
FORMULA FOR “@PHPTCR_TIME”
if tonumber({PHPICK00.PHPTCR})>0
then TIME(left ({@PHPTCR},2)+ ":"+ mid ({@PHPTCR},3,1)+mid ({@PHPTCR},5,1)+ ":" + mid({@PHPTCR},6,2))
The second formula is bringing the resulting text into a formatted field that looks like 00:04:32. However, this field is still stored just as a text string and therefore we can not do any math against it. This text can be translated into a time that we can act on by putting the formula within the function TIME().
Any other suggestion on this...simple way or more efficient way?.
I did this
FORMULA FOR “@PHPTCR”
if tonumber({PHPICK00.PHPTCR})<100
then "0000"+ totext(tonumber({PHPICK00.PHPTCR}))else if
tonumber({PHPICK00.PHPTCR})<1000
then "000"+ totext(tonumber({PHPICK00.PHPTCR}))else if
tonumber({PHPICK00.PHPTCR})<10000
then "00"+ totext(tonumber({PHPICK00.PHPTCR}))else if
tonumber({PHPICK00.PHPTCR})<100000
then "0"+ totext(tonumber({PHPICK00.PHPTCR}))
else totext({PHPICK00.PHPTCR})
FORMULA FOR “@PHPTCR_TIME”
if tonumber({PHPICK00.PHPTCR})>0
then TIME(left ({@PHPTCR},2)+ ":"+ mid ({@PHPTCR},3,1)+mid ({@PHPTCR},5,1)+ ":" + mid({@PHPTCR},6,2))
The second formula is bringing the resulting text into a formatted field that looks like 00:04:32. However, this field is still stored just as a text string and therefore we can not do any math against it. This text can be translated into a time that we can act on by putting the formula within the function TIME().
Any other suggestion on this...simple way or more efficient way?.