Blocworx Documentation
  • Welcome to Blocworx
  • The structure of Blocworx
    • What is a project?
  • Getting Started
  • How To's
    • How To's
      • Get Started: Build a Simple Module
      • Build a simple invoicing system
  • Page
    • Page Overview
      • Page Sections
      • Modules in Pages
      • Sub Pages
      • URL Links
    • Edit a Page
    • Manage Pages
  • Module
    • Module Overview
      • Module Sections
      • Blocs in Modules
      • Automated Reports
    • Module Editor
      • Add, remove and move Sections and Blocs
      • Edit Module Location & Icon
      • Edit Module Details
      • Import from another Module
      • Delete a Module
      • Make this module available to child instances
    • Manage Modules
  • Bloc
    • Bloc Overview
    • Bloc Front End Overview
      • Data Display
      • Advanced Reports
    • Bloc Editor Overview
    • Pdf & Doc File Template Builder
    • The Blocworx Process Flow
    • Edit Templates
  • Bloc Editor
    • Bloc Form Builder Preview
    • Fields, Tools and Charts
      • Standard Input Fields
        • QR Code
        • Text
        • Large Text Field
        • Checkbox
        • Multi Button
        • Dropdown from List
        • Date/Time Selector
        • Bluetooth (Beta)
        • Button
      • File & Image Fields
        • File Field
        • Multi File Field
        • Image URL Field
      • Linked Data Selection Fields
        • Dropdown from Bloc
        • Autocomplete
        • Radio Buttons From Bloc
        • Checkboxes From Bloc
        • Link Data Field
      • Content Editing Components
        • HTML Field
        • Separator Field
        • Content Editor For User (WYSIWYG)
        • Content Editor (WYSIWYG)
      • User Based Components
        • Create User Pop Up
        • Logged in Users Information
        • User Select Field
        • Signature & Authentication
      • Dynamic Output & Variable Components
        • Time/Date Difference
        • Auto Generate Field
        • Plain Data Field
        • Maths Field
        • Field Merge Builder
        • Label Field
        • Barcode Generator
      • Third Party Integration Components
        • Blocworx Gateway
        • Bartender Integration
        • File Builder
        • Mindee API
      • Charts, Results & Data Feeds
        • Local Data Doughnut Chart
        • Advanced Chart Set 1
        • Results Box
      • Sub Blocs, Tools & Components
        • Submit Button
        • Sub Bloc
        • Cross-Bloc Data Manipulator
        • Bloc List
        • Mail Alert
        • Calendar & Resource Planning
    • Field Create, Edit, Parameters, Rules and Actions
      • Creating a Field
      • Editing a Field
      • Field Parameters
        • Choose hidden options for this field
        • Mobile Configurations
        • Rule and Actions Based Parameters
        • Main Field Parameters
        • Conditional Value
        • Set Character View Limit
        • Conditional Visibility
        • Dynamic Data Update (Update Value Based On Another Date Field)
        • Field Names in Different Languages
        • Manage Field Actions
        • Load Data from Another Bloc
      • Field Rules and Actions
        • Can not be empty
        • Must Be Equal To
        • Cannot Be Equal To
        • Must be Between Two Values
        • Must be at least X number of characters
        • Must be exactly X number of characters
        • Item must have been entered elsewhere
        • Item must not have been entered elsewhere
        • A specific value is required elsewhere
        • A specific value cannot be present elsewhere
        • Populate another local field with data from elsewhere
        • Populate another local field with total from elsewhere
        • Max Allowed Duplicates
        • Can only be numbers/integers
        • Keep Data for Next Entry
        • Must be Certain Format
        • Cannot be Equal Another Local Field
        • Must be equal to another local field
        • Populate another local field with part of this field
        • Populate local field with data from another local field
        • Must have matching equivalent data in another form
    • Bloc Settings
      • Main Bloc Settings
      • Functional Behaviour Settings
      • Bloc Layout and Visibility Settings
      • Data Display Settings
      • User Restricted Data Settings
      • Manage and Build Templates
      • Bloc, User and Role Access
      • List of available Field Slugs
      • Manage Bloc Scheduler
  • Manage Data
    • Manage Data Overview
    • Raw Data and Counting Reports
    • Look Up/Edit Data
    • Find and Replace Data
  • Administration
    • Admin & Development Overview
    • Manage Users
      • Profile Filter
    • Roles & Permissions
      • Roles
      • Permissions
    • Manage Mail Alerts
  • App Settings
    • Sign In With Google
    • Timeout Setting
  • No Code Development
    • Manage Blocworx Instances
      • Parent and Child Instances
    • Edit Theme
    • Manage Modules
    • Manage Pages
    • Extra and Beta Features
Powered by GitBook
On this page

Was this helpful?

  1. Bloc Editor
  2. Fields, Tools and Charts
  3. Dynamic Output & Variable Components

Time/Date Difference

PreviousDynamic Output & Variable ComponentsNextAuto Generate Field

Last updated 9 months ago

Was this helpful?

The Time/Date Difference field is used to calculate the difference between two timestamps, be it whether its just calculating the difference between two times in a single day, or calculating the number of days between two dates. There are various formats that this data can be outputted as. Its a useful field for features like clocking in and out, or even just comparing expiry date with current date etc.

Difference Initial Field Parameters

Parameter
Description

Select Start Date/Time

The field that contains the date (or time) value that would be considered the beginning date to compare.

Select End Date/Time

The field that contains the date (or time) value that would be considered the second date or time to compare the first value to.

Format to Read

Default Results Format (For Date option)

This is the option that decides the final value of this field. Some users may want specific results or less rounded results. Round Number to Single Days: If the difference was 2.6 days, the value would be 3. Use Decimal Points with Days: This gives a more accurate result, e.g. 4.29 days. The .29 is the actual mathematical calculation of the minutes in that day. For example if the difference was 2 days and 18 hours, the result would be 2.75

Default Results Format (For Time Option)

This is the option that decides the final value of this field. Some users may want specific results or less rounded results, and some may want time format in the result itself. Use Decimal Points with Hours: With this option 2 hours and 20 minutes of a difference would result in 2.33 as the result (20 minutes being a third of an hour).

Use Total Hours: Here the value is rounded to the nearest hour and simply gives a final integer value. e.g. 4 and 37 minutes will result in the value: 5.

For Start Checkbox

When checked, it automatically uses the current Data or Time for the Start Date.

For Finish Checkbox

When checked, it automatically uses the current Data or Time for the Finish Date.

This is the format of the date or time that the 2 fields that are being compared must be. For example DD/MM/YYYY means both fields must be of that format, e.g. 06/12/2021 Please note that it will be likely you will be using our or to read the date or time from. To understand what formats to use, especially if you would like to use your own formats then please see the formats found at this link:

Use Time Format: Some users prefer to see the actual time format as it is easier to read and interpret when thinking about time. In this case 3 hours and 42 minutes will show as 03:42. Please note, with this option you will not be able to apply calculations or to it.

Date Field
Auto Generate Field
https://devhints.io/moment
Maths
totals
In this example, the two dates are compared and the Time/Date Difference Field is called Days Left Until Expiry. Here the value is 28 as its the difference between the 2 dates.
In this example, there is a difference of 2 hours and 20 minutes between both fields. In this particular output we would have opted to show the result as a decimal value. So 20 minutes is one third of an hour. Hence 2.33.