Flexi Kanban
  • Introduction
    • πŸ“ƒAbout Flexi Kanban
    • βš–οΈFlexi Kanban in Comparison with Other
    • πŸ“˜What are Kanbans?
    • πŸ“•User's Guide to the Kanban Boards
  • Standard Dashboard
    • πŸš€Getting started
      • How to Build a Simple Kanban Using Creation Wizard Abilities
      • Demo Example: Task Dashboard
      • Demo Example: Events Dashboard
      • Demo Example: Opportunities Dashboard
      • Demo Example: Gantt Dashboard
      • Demo Example: Cases Dashboard
    • πŸ“Basics
      • How to Create Standard Dashboard
      • How to Create Child Dashboard
      • How to Incorporate Child Dashboard into Lightning Page
      • How to Open Dashboard in builder (Edit)
      • How to Share Dashboard
      • How to Clone Dashboard
    • πŸ—οΈConfigure Dashboard
      • Working with Dashboard Layout
      • How to Configure Dashboard Basic Properties
      • How to Configure Dashboard Filters
      • How to Add Dashboard Statistics
      • How to Configure Variables
      • How to Configure Events
      • How to add Dashboard Buttons and Menus
    • πŸ™οΈConfigure Column
      • How to Π‘onfigure Column Properties
      • How to Set Column Groups
      • How to Set and Use Column Custom Attributes
      • How to configure Column Data Source
      • How to work with Related Objects
      • How to configure Column Header
      • How to configure Column Body
      • How to configure Column Footer
      • How to configure Column Container and Filters
    • 🎫Configure Card
      • How to configure Card Properties
      • How to configure Card Data Source and Conditions
      • How to configure Card Compact Layout
      • How to configure Card Layout
      • How to configure and use Card Custom Attributes
      • Configuring Card Movement and Column Junctions
      • Configuring Card Actions
    • πŸ“šGroups of Cards
      • How to configure Card Grouping
    • πŸ”§Tools
      • Using Merge Field Picker
      • Using Formula Editor
      • Configuring CSS styles
      • Configuring Rows, Cells, Menus and Buttons
      • Configuring Handlers
    • πŸ‘“Using Dashboard
      • How to use Kanban API actions
      • How to Incorporate Dashboard into Lightning Page
      • How to build the link to the Dashboard
      • How to Work with Variables
      • How to debug Dashboard
      • How to Work with Filters and Orders
    • ✨Howtos and Best Practices
      • How to configure communication between Dashboards
      • How to configure communication between Dashboard and Form
      • How to display different layouts for the same kanban card
      • How to design kanban for your needs
        • How to colorize cards
        • How to add a quick-filter column
      • What inactive column can be used for
      • Tips and Tricks
  • Composite Dashboard
    • πŸ—„οΈIntroduction
      • πŸ”§How to Create a Composite Dashboard
    • πŸͺ›Working with Composite Dashboard Layout
      • Configuring Parent Dashboard
      • Configuring Child Dashboard
    • πŸ–‡οΈConnections Between Dashboards
    • πŸ”¬Examples
      • !! Calendar Dashboard
    • πŸ₯‡Howtos and Best Practices
      • How to Pass Variables Between Parent and Child Dashboards
  • Components
    • πŸ“‹Forms
      • πŸ“‘Basics
        • Form Building Overview
        • Working with Form Settings
        • Working with Source Object fields
        • How to Preview the Form
        • How to configure the Form Sharing Rules
        • Understanding the Form Dependencies
        • Working with Conditional Styles
        • Working with Conditions
        • Search Over the Form
      • πŸͺ›Tools
        • Variables
        • Additional Fields
        • Context Object
        • Form Action
        • Event
      • Components
        • Add and Remove Form Components
        • Components Basic Properties
        • Components Validation Rules
        • Styling Form and Form Components
        • String Field
        • Text Area Field
        • Rich Text Field
        • Lookup Field
        • Date Field
        • Datetime Field
        • Time Field
        • Number Field
        • Currency Field
        • Multi-Select Field
        • Picklist Field
        • Option: Section
        • Option: Static Text
        • Option: Image
        • Option: Blank Space
        • Option: File
        • Option: Custom Button
        • Option: Custom URL
        • Option: Nested Form
        • Option: Lightning Component
        • List. Related Lists.
      • Using Form
        • How to incorporate Form into the Lightning Page
        • How to incorporate Form into Screen Flow
        • How to build the link to the Form
        • (unpublished, empty)How to incorporate Form into the Lightning Component
        • How to run Form Action from Lightning Component
      • Tricks, Hints and Best Practices
        • How to configure communication between Forms
        • How to pre-populate form fields
        • Deployment of Forms
        • What Are Parameters?
    • 🀾Actions/Action Groups
      • Basics
        • Working with Actions
        • Working with Action Groups
        • Working with Functions
        • Working with Context objects
        • Working with Conditions
      • Types
        • Validation Rule Action
        • Define Variable Action
        • Create Record Action
        • Update Records Action
        • Delete Records Action
        • Send Email Action
        • Callout Action
        • Execute Apex Action
        • KanBan API Action
      • Using Actions
        • !!unpublished empty!! How to execute Action/Group from the SF Process/Flow Builder
        • How to execute Action/Group through the REST api
        • !!unpublished empty!! How to execute Action/Group from the Einstain Bot
        • !!unpublished empty !! How to execute Action/Group from APEX
      • Best Practices
        • !! How to use Execute in background option
        • !! Deployment Actions/Action Groups
  • πŸ“–References
    • βš™οΈApplication Settings
    • ♾️Functions
      • SObject
      • Text
      • Logical
      • Numeric
      • Date and Time
      • JSON
      • System
      • Charts
    • πŸ—ƒοΈQuery Conditions
    • Apex Data Provider
    • πŸ“How to add a Kanban to Navigation Items Panel
    • πŸ‘₯Manage Licenses
    • πŸͺͺAssign Permission Sets
    • πŸ“¦Deployment
      • Deploying Using Standard Credentials
      • Deploying Using Connected App Authentication
      • How to configure the Salesforce Connected Application for Flexi Kanban deployment
  • Grant Login Access to Support
  • Subscription Plans
  • Support Agreement
  • Access License Agreement
  • Privacy Policy
Powered by GitBook
On this page
  • 1. MINUTES
  • 2. HOURS
  • 3. DATE
  • 4. DATETIME
  • 5. DATETIMEGMT
  • 6. DATEVALUE
  • 7. DATETIMEVALUE
  • 8. DATETIMEVALUEGMT
  • 9. DATETIMETOGMT
  • 10. ADDDAYS
  • 11. ADDMONTHS
  • 12. ADDYEARS
  • 13. ADDINTERVAL
  • 14. SUBTRACTINTERVAL
  • 15. NORMALIZEDATE
  • 16. STARTOFDAY
  • 17. ENDOFDAY
  • 18. FORMAT
  • 19. FORMATGMT
  • 20. STARTOFWEEK
  • 21. DAYSBETWEEN
  • 22. DATEDIFF
  • 23. YEAR
  • 24. MONTH
  1. References
  2. Functions

Date and Time

1. MINUTES

Converts number into minutes value.

MINUTES(parameter)

Replace parameter with the number value to convert it to minutes.

{Opportunity.RFQ_Date__c} + MINUTES(30) will add 30 minutes to RFQ_Date__c value.

If do not convert number to minutes, error will occur.

2. HOURS

Converts number into hours value.

HOURS(parameter)

Replace parameter with the number value to convert it to hours.

{Opportunity.RFQ_Date__c} + HOURS(12) will add 12 hours to RFQ_Date__c value.

If do not convert number to hours, error will occur.

3. DATE

Returns a date value from year, month, and day values you enter.

DATE(year, month, day)

Replace:

year with a four-digit year;

month with a two-digit month;

day with a two-digit day.

DATE(2016, 10, 10) returns October 10, 2016 as a date value.

4. DATETIME

Returns a date value from year, month, day, hours, minutes and seconds values in the local time zone of the current user.

DATETIME(year, month, day, hours, minutes, seconds)

Replace parameters with integer values of year, month, day, hours, minutes and seconds.

DATETIME(2005, 1, 2, 20, 30, 0) returns January 2, 2005, 8:30 PM as a datetime value.

5. DATETIMEGMT

Returns a date value from year, month, day, hours, minutes, seconds in GMT datetime value.

DATETIMEGMT(year, month, day, hours, minutes, seconds)

Replace parameters with integer values of year, month, day, hours, minutes and seconds.

DATETIMEGMT(2005, 1, 2, 20, 30, 0) returns January 2, 2005, 8:30 PM GMT as a datetime value.

6. DATEVALUE

Returns a date value for a date, datetime or text expression in the local time zone of the current user.

DATEVALUE(datetime_or_string)

Replace datetime_or_string with a date, datetime or text value.

DATEVALUE('11/15/2015') returns November 15, 2015 as a date value.

7. DATETIMEVALUE

Returns a datetime value for a date, datetime or text expression in the local time zone of the current user.

DATETIMEVALUE(date_or_string)

Replace date_or_string with a date, datetime or text value.

DATETIMEVALUE('2005-11-15 17:00:00') returns November 15, 2005 5:00 PM as a datetime value.

8. DATETIMEVALUEGMT

Returns a date value for a date, datetime or text expression in the GMT time zone.

DATETIMEVALUEGMT(datetime_or_string)

Replace datetime_or_string with a date/datetime or text value.

DATETIMEVALUEGMT('2015-11-15 17:00:00') returns November 15, 2005 5:00 PM as a datetime value in GMT time zone.

9. DATETIMETOGMT

Converts datetime value from the local time zone of a context user to the Greenwich Mean Time value with datetime type.

DATETIMETOGMT(datetime_object)

Replace datetime_object with a datetime value in context user local time zone.

Let current user local datetime value is 6/9/2015 10:09:14 PST.

DATETIMETOGMT({$System.DateTime}) returns 6/9/2015 17:09:14 GMT as a datetime value.

10. ADDDAYS

Returns a new date or datetime value that adds the specified number of days to the value of this instance.

ADDDAYS(date/datetime, number_of_days, boolean_consider_weekends)

Replace:

date/datetime with the date or datetime you want to add days to;

number_of_days with integer number of days that needs to be added to original value;

boolean_consider_weekends with true if calculation should exclude Saturday and Sunday, or false if it should not.

ADDDAYS(DATE(2019, 02, 12), 2, false) will return 2019-02-14 00:00:00.

11. ADDMONTHS

Adds the given number of months to the date or datetime value.

ADDMONTHS(date/datetime, number_of_months)

Replace:

date/datetime with the date or datetime you want to add months to;

number_of_months with the integer number of months that needs to be added to original value.

ADDMONTHS(DATE(2019, 02, 12), 5) will return 2019-07-12 00:00:00.

12. ADDYEARS

Adds the given number of years to the date or datetime value.

ADDYEARS(date/datetime, number_of_years)

Replace:

date/datetime with the date or datetime you want to add years to;

number_of_years with the integer number of years that needs to be added to original value.

ADDYEARS(DATE(2019, 02, 12), 5) will return 2024-02-12 00:00:00.

13. ADDINTERVAL

Adds time interval to the datetime based on the business hours for the current Salesforce organization.

To access business hours records navigate to Setup > Company Profile > Business Hours.

ADDINTERVAL(datetime, interval_string, business_hours_id_optional)

Replace:

datetime parameter with a datetime value;

interval_sting with time interval in the '1d 1h 1m' format ;

business_hours_id_optional with an ID of a business hours record used in your organization.

Note: a business_hours_id_optional parameter is optional.

If pass an empty string or null, interval will be added using 24-hours day, 7-days week, 365-days year.

Let current system datetime value is Tuesday, 04/01, 8 AM and business hours are set to 8 AM to 11 AM, Monday to Friday.

FORMAT(ADDINTERVAL({$System.DateTime}, '5h 30m', 'id_of_business_hours_record')) will return Wednesday, 04/02, 10:30 AM value.

14. SUBTRACTINTERVAL

Subtracts time interval from the datetime based on the business hours for the current Salesforce organization.

To access business hours records navigate to Setup > Company Profile > Business Hours.

SUBTRACTINTERVAL(datetime, interval_string, business_hours_id_optional)

Replace:

datetime parameter with a datetime value;

interval_sting with time interval in the '1d 1h 1m' format;

business_hours_id_optional with an ID of a business hours record used in your organization.

Note: a business_hours_id_optional parameter is optional.

If pass an empty string or null, interval will be subtracted using 24-hours day, 7-days week, 365-days year.

FORMAT(SUBSTRACTINTERVAL(DATETIME(2019, 03, 12, 11, 0, 0), '3h 30m')) will return 3/12/2019 7:30 AM.

15. NORMALIZEDATE

Moves a date or datetime to the closer working day according to business hours.

To access business hours records navigate to Setup > Company Profile > Business Hours.

NORMALIZEDATE(date/datetime, business_hours_id_optional)

Replace:

date/datetime parameter with value you need to normalize;

business_hours_id_optional with an ID of a business hours record used in your organization.

Note: a business_hours_id_optional parameter is optional.

If pass an empty string or null, default business hours setting for the organization will be used to calculate date or datetime.

Let current system datetime value is Saturday, 03/16, 2 PM and business hours are set to 8 AM to 11 AM, Monday to Friday.

NORMALIZEDATE({$System.DateTime}, id_of_business_hours_record) will return a datetime value for Monday, 3/18 8:00 AM.

16. STARTOFDAY

Moves a date/datetime to the start of working day according to business hours.

To access business hours records navigate to Setup > Company Profile > Business Hours.

STARTOFDAY(date/datetime, business_hours_id_optional)

Replace:

date/datetime parameter with value you need to calculate;

business_hours_id_optional with an id of a business hours record used in your organization.

Note: a business_hours_id_optional parameter is optional.

If pass an empty string or null, default business hours setting for the organization will be used to calculate date or datetime.

Let current system datetime value is Wednesday, 03/13, 2 PM and business hours are set to 8 AM to 11 AM, Monday to Friday.

STARTOFDAY({$System.DateTime}, id_of_business_hours_record) will return datetime value for Wednesday, 3/13 8:00 AM.

17. ENDOFDAY

Moves a date/datetime to the end of working day according to business hours.

To access business hours records navigate to Setup > Company Profile > Business Hours.

ENDOFDAY(date/datetime, business_hours_id_optional)

Replace:

date/datetime parameter with value you need to calculate;

business_hours_id_optional with an id of a business hours record used in your organization.

Note: a business_hours_id_optional parameter is optional. If pass an empty string or null, default business hours setting for the organization will be used to calculate date or datetime.

Let current system datetime value is Wednesday, 03/13, 2 PM and business hours are set to 8 AM to 11 AM, Monday to Friday.

ENDOFDAY({$System.DateTime}, id_of_business_hours_record) will return datetime value for Wednesday, 3/13, 11AM.

18. FORMAT

Returns a value containing a date expression formatted according to given parameter.

FORMAT(date/datetime, format_string_optional)

Replace:

date/datetime with the original date or datetime value;

optional parameter format_string_optional with the valid format expression.

FORMAT(DATE(2019, 02, 12)) will return 2/12/2019.

FORMAT(DATETIME(2019, 02, 12, 11, 23, 0)) will return 2/12/2019 11:23 AM

FORMAT(DATETIME(2019, 02, 12, 11, 23, 0), 'h:mm a') will return 11:23 AM.

19. FORMATGMT

Returns a value containing an expression formatted according to given parameter in GMT time value.

FORMATGMT(date/datetime, format_string_optional)

Replace:

date/datetime with the original date or datetime value;

optional parameter format_string_optional with the valid format expression.

Let organization time zone is Eastern Standard Time.

FORMATGMT(DATETIME(2019, 03, 12, 11, 23, 0)) will return 3/12/2019 3:23 PM.

20. STARTOFWEEK

Returns date or datetime representing the first day of week for the date passed to the function in the local time zone of the current user.

STARTOFWEEK(date/dateTime)

Replace date/dateTime parameter with the date or datetime value which start date of the week is to be determined.

STARTOFWEEK({Opportunity.createdDate}) will return start of the week date for the value of createdDate in GMT timezone.

Let current system datetime value is Wednesday, 03/13, 2 PM.

STARTOFWEEK({$System.DateTime}) will return datetime value for Monday, 3/11, 2 PM.

21. DAYSBETWEEN

Returns number of days between two date or datetime values.

DAYSBETWEEN(date/datetime, date/datetime, ignoreWeekends)

Replace:

first two parameters with the two date/datetime values;

boolean ignoreWeekends with true if calculation should exclude Saturdays and Sundays, or false if it should not.

Let createdDate equals 2001-07-04 and closedDate equals 2001-07-10

DAYSBETWEEN({Opportunity.createdDate}, {Opportunity.closedDate}, false) will return 5.

22. DATEDIFF

Returns number of minutes, hours and days between date/datetime values.

To access business hours records navigate to Setup > Company Profile > Business Hours.

DATEDIFF(date/datetime, date/datetime, business_hours_id_optional, result_type_optional, hours_in_day_optional)

Replace:

first two parameters with two dates;

business_hours_id_optional optional parameter with an ID of a business hours record used in your organization;

result_type_optional optional parameter with one of the following values: 'Duration', 'Hours', 'Days' (this parameter is case-insensitive);

Duration format looks like this: 1d 7h 45m.

hours_in_day_optional is an optional parameter that can be used when user passes 'Duration' or 'Days' as a result_type_optional - it defines number of hours in a day for function calculation.

Notes:

  • A business_hours_id_optional parameter is optional. If omit this parameter or pass null, function will calculate result using 24-hours day, 7-days week, 365-days year.

  • Function with 'Hours' result type will return full number of hours rounded down. This can be useful to avoid lates in calculated schedules, etc.

  • If hours_in_day_optional is used, business_hours_id_optional should be set to null (optional parameters can be omitted only if they are last, otherwise they should be set to null).

Let createdDate = 2001-07-04 and closedDate = 2001-07-05

DATEDIFF({Opportunity.createdDate}, {Opportunity.closedDate}) returns 1440 (minutes).

Let createdDate = 2020-06-29 and closedDate = 2020-07-01T03:30:05Z, and business hours are set as 8 hours per day from Monday to Friday.

DATEDIFF({Opportunity.createdDate}, {Opportunity.closedDate}, business_hours_id) returns 960 (minutes).

Let createdDate = 2020-06-29 and closedDate = 2020-07-01T03:30:05Z.

DATEDIFF({Opportunity.createdDate}, {Opportunity.closedDate}, null, DURATION) will return 44h 30m.

Let createdDate = 2020-06-29 and closedDate = 2020-07-01T03:30:05Z.

DATEDIFF({Opportunity.createdDate}, {Opportunity.closedDate}, null, Hours) will return 44 (integer number of hours).

Let createdDate = 2001-07-04 and closedDate = 2001-07-05.

DATEDIFF({Opportunity.createdDate}, {Opportunity.closedDate}, false, 'Duration', 8) returns 3d.

23. YEAR

Returns the year component of a date or datetime value.

YEAR(parameter)

Replace parameter with the date/datetime value.

Let RFQ_Date__c = 2020-07-01T03:30:05Z.

YEAR({Opportunity.RFQ_Date__c}) returns 2020 (integer representing year component of RFQ_Date__c field value).

24. MONTH

Returns the month component of a date or datetime value.

MONTH(parameter)

Replace parameter with the date/datetime value.

Let RFQ_Date__c = 2020-07-01T03:30:05Z.

MONTH({Opportunity.RFQ_Date__c}) returns 7 (integer representing month component of RFQ_Date__c field value).

Last updated 1 year ago

Check supported formats here: ).

Check supported formats here: ).

πŸ“–
♾️
http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html
http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html