Working with Days Between Dates Process
Process Purpose
The Days Between Dates process is used to calculate the number of days between two given dates. The result is stored in a variable.
Check the provided Days Between Dates examples at the end of the topic.
When you add a process, you are required to define its settings. This occurs in the process's properties window which is displayed automatically after having added the Days Between Dates process.
If any subsequent edition is required, double-click the process to open its properties window and enter the necessary modifications.
Fill in the following options:
Source Values |
|
Date 1 |
Enter the value for the initial date/time or click |
Format Date 1 |
Select the "Date 1" format from the drop-down list or enter it with the use of a syntax list that is accessed by clicking |
Date 2 |
Enter the value for the second date/time or click |
Format Date 2 |
Select the "Date 2" format from the drop-down list or enter it with the use of a syntax list that is accessed by clicking |
Result |
|
Output Format |
Define the output format for the result by selecting it from the drop down list. |
Result Variable |
Click |
If required, use the icon on the upper right corner of the properties window:
Use the icon to attach any relevant notes to this process. Click it and enter your notes in the resulting text box. These notes will be displayed in the corresponding "Actions" tab or "Process" window (in the "Notes" field) and in the "Developer Report".
After filling in the required options, click to conclude or
to abort the operation.
The added process is displayed in the corresponding "Actions" tab or "Process" window.
If the source value for the date format is invalid (ex: b9F00) or left blank, the date format will display "99/99/9999".
Use the right click in MCL-Designer's input boxes to access certain features regarding the input box's option as well as general actions such as "Copy"; "Paste"; "Search".
Ex: If you right-click the "Variable" input box (included in a "Conversion's" properties window), you are provided with the "Search..."and "Variable Select" options.
If you right-click another input box, it will provide other possibilities.
![]() | Example 1 - Date 1 format = Date and Time (YYYY/MM/DD HH:MM:SS) & Date 2 format = Date and Time (DD/MM/YYYY HH:MM:SS) |
Date 1: 2016/01/19 12:00:00 Format Date 1: %Y/%M/%D %H:%:N:%S
Date 2: 01/01/2016 10:10: 00 Format Date 2: %D/%M/%Y %H:%:N:%S
|
![]() | Example 2 - Date 1 format = Time (HH:MM:SS.MS) & Date 2 format = Time (HH:MM:SS.MS) |
Date 1: 23:10:10.033 Format Date 1: %H:%:N:%S.%L
Date 2: 09:20:20.001 Format Date 2: %H:%:N:%S.%L
|
![]() | Example 3 - Date 1 format = Time (YYYY/MM/DD) & Date 2 format = Date (DD/MM/YYYY) |
Date 1: 2016/01/19 Format Date 1: %Y/%M/%D
Date 2: 01/01/2016 Format Date 2: %D/%M/%Y
|
![]() | Example 4 - Date 1 format = Date and Time (YYYY/MM/DD HH:MM:SS.MS) & Date 2 format = Time (HH/MM/SS.MS) |
Date 1: 2017/05/22 23:10:10.033 Format Date 1: %Y/%M/%D %H:%:N:%S.%L
Date 2: 09:20:20.001 Format Date 2: %H:%:N:%S.%L
|
![]() | Example 5 - Date 1 format = Date and Time (YYYY/MM/DD HH:MM:SS.MS) & Date 2 format = Date and Time (DD/MM/YYYY HH/MM/SS.MS) |
Date 1: 2016/01/19 12:00:00.000 Format Date 1: %Y/%M/%D %H:%N:%S.%L
Date 2: 01/01/2016 23:10:10.010 Format Date 2: %D/%M/%Y %H:%N:%S.%L
|