General

CRM stores DateTime values as UTC and then converts them back to the current user's local time when viewing them. As such performing some of the contained actions on dates stored as UTC will produce "unexpected" results. I've given the option where appropriate to either first evaluate the date(s) to the workflow user's local time or as continue as UTC. 

Add Business Days

Original Date - The DateTime to add to.

Business Days To Add - The number of week day (M-F) days to add.

Holiday/Closure Calendar - The Business Closure or Holiday calendar whose day long events will not be counted when adding days.

Returns - New DateTime with the specified number of business days added.

Add Days

Original Date - The DateTime to add to.

Days To Add - The number of week day (M-F) days to add.

Returns - New DateTime with the specified number of days added.

Add Hours

Original Date - The DateTime to add to.

Days To Add - The number of hours to add.

Returns - New DateTime with the specified number of hours added.

Add Minutes

Original Date - The DateTime to add to.

Days To Add - The number of minutes to add.

Returns - New DateTime with the specified number of minutes added.

Add Months

Original Date - The DateTime to add to.

Days To Add - The number of months to add.

Returns - New DateTime with the specified number of months added.

Add Years

Original Date - The DateTime to add to.

Days To Add - The number of years to add.

Returns - New DateTime with the specified number of years added.

Date Difference Days

Starting Date - Starting DateTime of the calculation.

Ending Date - Ending DateTime of the calculation.

Returns - The number of days difference between the specified dates.

Date Difference Hours

Starting Date - Starting DateTime of the calculation.

Ending Date - Ending DateTime of the calculation.

Returns - The number of hours difference between the specified dates.

Date Difference Minutes

Starting Date - Starting DateTime of the calculation.

Ending Date - Ending DateTime of the calculation.

Returns - The number of minutes difference between the specified dates.

Date Difference Months

Starting Date - Starting DateTime of the calculation.

Ending Date - Ending DateTime of the calculation.

Returns - The number of months difference between the specified dates.

Date Difference Years

Starting Date - Starting DateTime of the calculation.

Ending Date - Ending DateTime of the calculation.

Returns - The number of years difference between the specified dates.

Get Day Number Of Week

Date To Use - The DateTime to evaluate.

Evaluate As User Local - Use User Local or UTC.

Returns - The number representing the day of the week, Sunday being 1.

Get Day Number Of Year

Date To Use - The DateTime to evaluate.

Evaluate As User Local - Use User Local or UTC.

Returns - The number representing the day of the year.

Get Day Of Week

Date To Use - The DateTime to evaluate.

Evaluate As User Local - Use User Local or UTC.

Returns - The word (Sunday, Monday, etc...) representing the day of the week.

Get Quarter Number Of Year

Date To Use - The DateTime to evaluate.

Evaluate As User Local - Use User Local or UTC.

Returns - The number representing the quarter of the year (1-3, 4-6, 7-9, 10-12).

Get Week Number Of Year

Date To Use - The DateTime to evaluate.

Evaluate As User Local - Use User Local or UTC.

Returns - The number representing the week of the year.

Get Month Start/End Dates

Date To Use - The DateTime to evaluate.

Evaluate As User Local - Use User Local or UTC.

Returns - DateTime of the first day of the month (1/1/2015 12:00:00).

Returns - DateTime of the last day of the month (1/31/2015 11:59:59).

Get Quarter Start/End Dates

Date To Use - The DateTime to evaluate.

Evaluate As User Local - Use User Local or UTC.

Returns - DateTime of the first day of the quarter (1/1/2015 12:00:00).

Returns - DateTime of the last day of the quarter (3/31/2015 11:59:59).

Get Week Start/End Dates

Date To Use - The DateTime to evaluate.

Evaluate As User Local - Use User Local or UTC.

Returns - DateTime of the first day of the week (1/4/2015 12:00:00).

Returns - DateTime of the last day of the week (1/10/2015 11:59:59).

Get Year Start/End Dates

Date To Use - The DateTime to evaluate.

Evaluate As User Local - Use User Local or UTC.

Returns - DateTime of the first day of the year (1/1/2015 12:00:00).

Returns - DateTime of the last day of the year (12/31/2015 11:59:59).

Is Between

Starting Date - The beginning DateTime of the range.

Date To Validate - The DateTime to evaluate.

Ending Date - The ending DateTime of the range.

Returns - Boolean value indicating if the specified DateTime is in the defined range.

Is Business Day

Date To Check - The DateTime to evaluate.

Holiday/Closure Calendar - The Business Closure or Holiday calendar whose day long events will not be counted when evaluating.

Evaluate As User Local - Use User Local or UTC.

Returns - Boolean value indicating if the specified DateTime is a business day.

Is Same Day

First Date - The first DateTime to evaluate.

Second Date - The second DateTime to evaluate.

Evaluate As User Local - Use User Local or UTC.

Returns - Boolean value indicating if the two specified DateTimes are on the same date.

Relative Time String

Starting Date - Starting DateTime of the calculation.

Ending Date - Ending DateTime of the calculation.

Returns - A string presentation of the elapsed time, e.g. "2 months ago" or "5 hours ago".

ToDateTime

Text To Convert - The text value to attempt to convert to a valid DateTime.

Returns - The converted DateTime value - if conversion fails a DateTime of 1/1/1 12:00:00 will be returned.

Returns - Boolean value indicating if the text was successfully converted.

To UTC String

Date To Format - The DateTime value to format.

Culture - The culture value used to format the result, e.g. "en-US" or "ja-JP".

Returns - A text representation of the specified DateTime based on the chosen culture.

Last edited May 18, 2015 at 4:44 AM by JLattimer, version 1