Skip to content

Commit

Permalink
Final update for v1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jdunkerley committed May 14, 2016
1 parent c154fbe commit a673fa3
Showing 1 changed file with 40 additions and 43 deletions.
83 changes: 40 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,77 +18,74 @@ You will need to copy all the `XML` and `DLL` files.

### [MiscUtils](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/Miscellaneous-Functions-%28MiscUtils.xml%29)

General functions
A few additional general methods for data preparation.

- [IfNull](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/Miscellaneous-Functions-%28MiscUtils.xml%29#ifnull): If first value is null return second
- [Coalesce](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/Miscellaneous-Functions-%28MiscUtils.xml%29#coalesce): Given list of values return first non null value *(C++)*

### MathUtils
### [MathUtils](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/Math-Functions-(MathUtils.xml))

Math based functions that I havent got a better home for!

- `Modulo`: General Double Based Modulo function
- `HexBinX`: Given an X,Y point and optional radius, get X co-ordinate of bin's centre *(C++)*
- `HexBinY`: Given an X,Y point and optional radius get Y co-ordinate of bin's centre *(C++)*
- `Rand_Triangular`: Given a uniform random number transform into a triangular distributed random
- `Avg`: Average of a list of values ignoring `NULL` *(C++)*
- `Count`: Count of a list of values ignoring `NULL` *(C++)*
- `Sum`: Sum of a list of values ignoring `NULL` *(C++)*
- [Modulo](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/Math-Functions-(MathUtils.xml)#modulo): General Double Based Modulo function
- [HexBinX](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/Math-Functions-(MathUtils.xml)#hexbinx): Given an X,Y point and optional radius, get X co-ordinate of hexagonal bin's centre
- [HexBinY](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/Math-Functions-(MathUtils.xml)#hexbiny): Given an X,Y point and optional radius get Y co-ordinate of hexagonal bin's centre
- [Rand_Triangular](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/Math-Functions-(MathUtils.xml)#rand_triangular): Given a uniform random number transform into a triangular distributed random
- [Avg](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/Math-Functions-(MathUtils.xml)#avg): Average of a list of values ignoring `NULL`
- [Count](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/Math-Functions-(MathUtils.xml)#count): Count of a list of values ignoring `NULL`
- [Sum](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/Math-Functions-(MathUtils.xml)#sum): Sum of a list of values ignoring `NULL`

### DateUtils
### [DateUtils](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/Date-and-Time-Functions-(DateUtils.xml))

Some useful date functions.
Some additional functions for working with Dates and to a certain extent Times.

#### Date Time Creation Functions (Currently Just Concatenation)

- `MakeDate`: Create a new date from Year, Month, Day
- `MakeTime`: Create a new time from Hour, Minute, Second
- `MakeDateTime`: Create a new `DateTime` from Year, Month, Day, Hour, Minute, Second
- `ToDate`: Truncate a `DateTime` to a `Date`
- `ToDateTime`: Appends midnight to a `Date` to create a `DateTime`
- [MakeDate](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/Date-and-Time-Functions-(DateUtils.xml)#makedate): Create a new date from Year, Month, Day
- [MakeTime](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/Date-and-Time-Functions-(DateUtils.xml)#maketime): Create a new time from Hour, Minute, Second
- [MakeDateTime](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/Date-and-Time-Functions-(DateUtils.xml)#makedatetime): Create a new `DateTime` from Year, Month, Day, Hour, Minute, Second
- [ToDate](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/Date-and-Time-Functions-(DateUtils.xml)#todate): Truncate a `DateTime` to a `Date`
- [ToDateTime](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/Date-and-Time-Functions-(DateUtils.xml)#todatetime): Appends midnight to a `Date` to create a `DateTime`

#### Date Part Functions (returns numbers)

- `Day`: Get the day of the Month [1-31]
- `Month`: Gets the month number [1-12]
- `Year`: Gets the four digit year
- `WeekDay`: Gets the day of the week [Sunday (0) through to Saturday (6)]
- `Quarter`: Gets the quarter of the date [1-4]
- `OrdinalDay`: Gets the day of the year [1-366]
- [Day](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/Date-and-Time-Functions-(DateUtils.xml)#day): Get the day of the Month [1-31]
- [Month](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/Date-and-Time-Functions-(DateUtils.xml)#month): Gets the month number [1-12]
- [Year](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/Date-and-Time-Functions-(DateUtils.xml)#year): Gets the four digit year
- [WeekDay](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/Date-and-Time-Functions-(DateUtils.xml)#weekday): Gets the day of the week [Sunday (0) through to Saturday (6)]
- [Quarter](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/Date-and-Time-Functions-(DateUtils.xml)#quarter): Gets the quarter of the date [1-4]
- [OrdinalDay](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/Date-and-Time-Functions-(DateUtils.xml)#ordinalday): Gets the day of the year [1-366]

#### Period Start and End

- `WeekStart`: Get first Sunday before or equal to date
- `WeekEnd`: Get first Saturday after or equal to date
- `MonthStart`: Get First Day of Month
- `MonthEnd`: Get Last Day of Month
- `QuarterStart`: Get First Day of Quarter
- `QuarterEnd`: Get Last Day of Quarter
- `YearStart`: Get First Day of Year
- `YearEnd`: Get Last Day of Year
- [WeekStart](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/Date-and-Time-Functions-(DateUtils.xml)#weekstart): Get first Sunday before or equal to date
- [WeekEnd](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/Date-and-Time-Functions-(DateUtils.xml)#weekend): Get first Saturday after or equal to date
- [MonthStart](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/Date-and-Time-Functions-(DateUtils.xml)#monthstart): Get First Day of Month
- [MonthEnd](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/Date-and-Time-Functions-(DateUtils.xml)#monthend): Get Last Day of Month
- [QuarterStart](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/Date-and-Time-Functions-(DateUtils.xml)#quarterstart): Get First Day of Quarter
- [QuarterEnd](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/Date-and-Time-Functions-(DateUtils.xml)#quarterend): Get Last Day of Quarter
- [YearStart](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/Date-and-Time-Functions-(DateUtils.xml)#yearstart): Get First Day of Year
- [YearEnd](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/Date-and-Time-Functions-(DateUtils.xml)#yearend): Get Last Day of Year

#### Other Date Functions

- `DateAdd`: Equivalent to [DateTimeAdd](http://downloads.alteryx.com/Alteryx8.6.2/WebHelp/Reference/DateTimeFunctions.htm) but returning a Date
- `BusinessDays`: Number of weekdays between two dates
- `IsLeapYear`: Is a year a leap year *(takes a year not a date as an input use `IsLearYear(Year([Date])`)*
- [DateAdd](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/Date-and-Time-Functions-(DateUtils.xml)#dateadd): Equivalent to [DateTimeAdd](http://downloads.alteryx.com/Alteryx8.6.2/WebHelp/Reference/DateTimeFunctions.htm) but returning a Date
- [BusinessDays](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/Date-and-Time-Functions-(DateUtils.xml)#businessdays): Number of weekdays between two dates
- [IsLeapYear](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/Date-and-Time-Functions-(DateUtils.xml)#isleapyear): Is a year a leap year *(takes a year not a date as an input use `IsLearYear(Year([Date])`)*

### [StringUtils](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/String-Functions-%28StringUtils.xml%29)

String manipulation
A few extension methods for working with strings.

- [LeftPart](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/String-Functions-%28StringUtils.xml%29#leftpart): Gets the text before the first instance of a separator
- [RightPart](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/String-Functions-%28StringUtils.xml%29#rightpart): Gets the text after the first instance of a separator
- [Split](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/String-Functions-%28StringUtils.xml%29#split): Splits a string into tokens and then returns the specified instance *(C++)*
- [LeftPart](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/String-Functions-(StringUtils.xml)#leftpart): Gets the text before the first instance of a separator
- [RightPart](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/String-Functions-(StringUtils.xml)#rightpart): Gets the text after the first instance of a separator
- [Split](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/String-Functions-(StringUtils.xml)#split): Splits a string into tokens and then returns the specified instance

#### Retired Functions

*Alteryx has incorporated these into the v10 code base so not needed there.
If running in older versions un-comment the Xml*

- [StartsWith](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/String-Functions-%28StringUtils.xml%29#startswith): Does a string start with another
- [EndsWith](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/String-Functions-%28StringUtils.xml%29#endswith): Does a string end with another
- [Contains](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/String-Functions-%28StringUtils.xml%29#contains): Is a string in another
- [StartsWith](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/String-Functions-(StringUtils.xml)#startswith): Does a string start with another
- [EndsWith](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/String-Functions-(StringUtils.xml)#endswith): Does a string end with another
- [Contains](https://github.com/jdunkerley/AlteryxFormulaAddOns/wiki/String-Functions-(StringUtils.xml)#contains): Is a string in another

## Testing

Expand Down

0 comments on commit a673fa3

Please sign in to comment.