SOLVED
Convert numbers storaged in a csv file as V_Wstring to a negative number (double)
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
Carolina18
5 - Atom
07-27-2023
11:54 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi all, I´m trying to convert numbers storaged as V_Wstring in a csv file to a negative number.
The csv format storage the negative numbers with () (ex.: (238,456,791)
I tried two ways
- Changing the data type from V_Wstring to Double and Float (in this case brings only the digits before the first comma)
- Using the "ToNumber" formula (in this case brings the positive numbers correctly but shows a warning conversion regarding the negative ones)
If any additional data or screenshot is helpful please let me know and I´ll add it
Thanks a lot in advance!
Solved! Go to Solution.
Labels:
- Labels:
- Error Message
- Preparation
3 REPLIES 3
18 - Pollux
07-28-2023
09:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Try ToNumber(Replace(Replace([Field],"(","-"),")",""))
07-28-2023
10:19 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks a lot Alex!
It worked just fine 😊
18 - Pollux
07-28-2023
12:23 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Great news!
