nfu | Numeric Fu for the command line
kandi X-RAY | nfu Summary
kandi X-RAY | nfu Summary
NOTE: nfu is unlikely to receive any more major updates, as I'm currently working on its successor ni.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of nfu
nfu Key Features
nfu Examples and Code Snippets
Community Discussions
Trending Discussions on nfu
QUESTION
I am looking to hard code units into my record fields. Currently I have the ToString() method overriden and used the [StructuredFormatDisplay("{AsString}")] atribute. This has worked except for it is unfortunate that I lose FSharp's pretty printing (mainly the offsetting) on types that this record is nested into. With that said, I am wondering if anyone knows of any tricks to accomplish this.
Essentially I have this type:
...ANSWER
Answered 2017-Jun-21 at 16:23Looks like I can get what I am looking for by wrapping the unit in a DU and overriding that ToString() method.
QUESTION
My table has a text column called Remarks
which usually contains a large amount of text.
Here's an example:
3/24/2017 11:14:41 AM - EMD FOR STATUS NFU 3/30/17
3/30/2017 10:58:03 AM - CLD PER RECEPTIONIST GM UNAVAILABLE NFU 04-13-2017
4/13/2017 11:10:15 AM - CLD PER RECEPTIONIST WILL GIVE INFO NFU4/27
4/27/2017 9:02:20 AM - MLD INV WITH 90 DAY STAMP
4/27/2017 9:15:03 AM - PER REP WILL CALL CUSTOMER FOR PAYMENT
4/27/2017 11:03:46 AM - NFU 05/5PER REP CUSTOMER CONFUSION
5/5/2017 8:55:17 AM - NFU 5/9/2017 CRP PER REP CHECK WAS MLD 5/2/17
All of that text would be crammed into a single field, and I need to extract the last NFU date from the field for use in calculations and filtering.
In the above example, I would want to extract the date 5/9/2017 from the last row.
But as you can see, the date could be in any format, anywhere in the field.
I presume Excel can parse the text into a date value in any of the above formats (if not, I'll deal with that some other way - employee training, etc.)
The main things I need to figure out how to do using PowerQuery are:
- Find the last instance of "NFU" in this field
- Extract all text immediately following that last instance of "NFU", including the space between "NFU" and the date, if present.
At this point, the result should be:
" 5/9/2017 CRP PER REP CHECK WAS MLD 5/2/17"
- Remove any whitepsace at the beginning of the string.
At this point, the result should be:
"5/9/2017 CRP PER REP CHECK WAS MLD 5/2/17"
- Find the first character that is not
0-9
,/
, or-
(or the end of the string, whichever comes first) - Truncate the string at the first non-date character, if appropriate.
At this point, the result should be:
"5/9/2017"
- Finally, attempt to format the resulting text into
Date
type/format, and return as the result for a PowerQuery custom column.
Looking at the PowerQuery string functions available, I'm not sure whether this is even possible.
...ANSWER
Answered 2017-May-11 at 15:34A simple formula like =RIGHT(A1,LEN(A1)-(FIND("NFU",A1,1)-1)) would work to extract the string next to NFU. Assuming the text is at cell A1. But needs to further drill down to get your other requirements.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install nfu
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page