SOLVED
Text to Number
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
pgolightly
5 - Atom
‎10-31-2016
04:47 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I have parsed a 400 character string from a .txt file in Input Data to 91 fields with set lengths based on a specified matrix using the 'Read as a fixed width text file' option from the Resolve File type box that opens when the .txt file is selected. One field needs to be converted from text to a four decimal number as shown. The text field contains no decimal point so removing the leading zeros doesn't work because it converts '000000437 to 437.
'000000437 to 0.0437
'000012587 to 1.2587
Thanks
Solved! Go to Solution.
Labels:
- Labels:
- Input
- Parse
- Preparation
2 REPLIES 2
20 - Arcturus
‎10-31-2016
05:20 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
ToNumber(left([input],5)+'.'+right([input],4))
that should do do the trick.
Cheers,
mark
Alteryx ACE & Top Community Contributor
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Joe_Mako
12 - Quasar
‎10-31-2016
05:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
How about:
ToNumber([Field])/10000
