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!

Add a decimal point in a non-traditional place (lat/long) 1

Status
Not open for further replies.

ladyemrys

Programmer
Aug 17, 2007
44
0
0
US
Hi!

I'm actually working on a CR for my google export, and the lat/long for our bus stops in one of my programs (TransitMaster) is being displayed without a decimal point. Right now I am manually putting it in using excel and word, but they change the values and it's very cumbersome. I'd rather set up the CR to do it for me if possible.

Does anyone know how i can format a field {MDT_LAT} and another field {MDT_LONG} in the following way:

LAT:
339879239

Desired format:

LAT:
33.9879239

LONG:
-1184717181

Desired format:
LONG:
-118.4717181

Let me know if I need to post further information, I'm happy to do so. Thanks so very much!

LadyEmrys
 
The following assumes the fields always have 7 decimals:

stringvar y := totext({table.lat},0,""); //or {table.long}
left(y,len(y)-7)+"."+right(y,7);

-LB
 
lbass you are a genius! thanks sooooooo much, this is going to save me so much work! i can't thank you enough!!!

LE
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top