Working with Date/Time Format Process

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

Working with Date/Time Format Process

Previous pageReturn to chapter overviewNext page

 

Process Purpose

 

The Date/Time Format process is used to convert a given date/time into a specific format. The result is stored in a variable.

Check the provided Date/Time Format 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 Intervals 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:

 

Input

Date

Enter the input value of the date or time that will be formatted OR  click and select a variable with that value. See Variable Definition.

Format

Select an input format from the drop-down OR  enter it with the use of a syntax list that is accessed by clicking .

This format needs to match the format of the date/time value from the "Date" variable value. Ex: For a "Date" time presented like this: 09:50:25, use the following format: %H:%M:%S.

 

The "System Format" option is only available to define a "Date" format (meaning, it does NOT include time values in its format).

Result

Result Variable

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

Format

Select the output format for the result from the drop-down OR  enter your own format with the help of a syntax list that is accessed by clicking .

 

The "System Format" option is only available to define a "Date" format (meaning, it does NOT include time values in its format).

 

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 Format Examples

 

Click Here to View Example1 - Input format = Date and Time (DD/MM/YYYY HH:MM:SS) >> output format = Date (YYYY/MM/DD)

 

Click Here to View Example 2 - Input format = Date and Time (YYYYMMDDHHMMSS) >> output format = Date (YY/MM/DD)

 

Click Here to View Example 3 - Input format = Date (YYYY-MM-DD) and Time  (HH:MM:SS) >> output format = Date (d/m/YYYY HH:MM:SS.MS)

 

Click Here to View Example 4 - Input format = Date (DD/M/YY) >> output format = Date (DD/MM/YYYY)