Working with Date/Time Operations Process

Navigation:  How to Work with Processes > Working with the Date Processes Group >

Working with Date/Time Operations Process

Previous pageReturn to chapter overviewNext page

 

Process Purpose

 

The Date/Time Operations process is used to calculate a date, when days are added to a given starting date. The result is stored in a variable.

Check the provided Date/Time Operations 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 Date/Time Operations process. In this case, the properties window includes 2 tabs - "General" and "Error".

If any subsequent edition is required, double-click the process to open its properties window and enter the necessary modifications.

 

"General" tab

 

 

Proceed as follows:

 

Starting Date

Date

Define the value for the “Starting Date”. Either enter it OR  click and select a variable with that value. See Variable Definition.

Format

Select a “Starting Date” format from the drop-down. You can write a date format with the use of a syntax list that is accessed by clicking . See Accepted Syntax List.

This format needs to match the format of the date/time value from "Date". Ex: For a "Date" presented like this: 22/07/2018, use the following format: %D%/%M%/%Y.

Operation

Operation

Check the required operation:

"Add" - this operation adds the defined value to the "Starting Date".

"Subtract" - this operation subtracts the defined value to the "Starting Date".

Value to Add

Enter the number of time units to be added/subtracted OR  click and select a variable with that value.

Interval

Define the type of time units to be added by selecting one from the drop-down (“Days”; “Quarters”; Months”; “Weeks”; etc.).

Result

Result Variable

Click to define the variable that will receive the result value. See To Select/Create a Variable.

Output Format

Select the intended output format from the drop-down OR  enter your own format which must comply with the available syntax list that is accessed by clicking . See Accepted Syntax List.

 

Proceed to the "Error" tab.

 

"Error" tab

 

 

Fill in the available option.

 

If Error

Go to

Select a target location from the drop-down or list, in case an error occurs. See Detail of a window below.

 

 

Detail of a window:

 

 

"S:Menu" is a screen included in the same program as the process.

"R:Routine_1" is a routine included in the same program as the process.

 

If required, use the icon, on the upper right corner of the properties window, 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.

 

 

Use the right-click in MCL-Designer's input boxes to access some related options as well as the general "Cut", "Copy"; "Paste"; "Search" actions (active/inactive according to the current context).

Ex: If you right-click the "Variable" input box (included in a "Conversion's" properties window), you are provided with general editing/search actions and other more specific options such as "Variable Select" (see "Variable Select") ;"Variable Insert" (see "Variable Insert")"Insert Special Character" (see To Insert Special Characters into a Control's Text Input Field) and "Localization Select" (see Localization List).

If you right-click another input box, it nay provide other possibilities.

 

 

 

Date/Time Operation Examples

 

Click Here to View Example 1 - Start Date format = Date (YYYYDDMM) >> Output format = Date (DD/MM/YYYY)

 

Click Here to View Example 2 - Start Date format = Date and Time (YYYYMMDDHHMMSS.MS) >> Output format = Date and Time (DD/MM/YYYY HH:MM:SS.MS)

 

Click Here to View Example 3 - Start Date format = Date and Time (YYYY-MM-DDHHMMSS.MS) >> Output format = Date and Time (DD-MM-YYYY HH:MM:SS.MS)