Working with Date/Time Format Process
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 |
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 |
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 |
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.
![]() | Click Here to View Example1 - Input format = Date and Time (DD/MM/YYYY HH:MM:SS) >> output format = Date (YYYY/MM/DD) |
Input Format: %D/%M/%Y %H:%N:%S Input: 10/05/1998 19:23:03
Output Format: %Y/%M/%D Corresponding Output: 1998/05/10
|
![]() | Click Here to View Example 2 - Input format = Date and Time (YYYYMMDDHHMMSS) >> output format = Date (YY/MM/DD) |
Input Format: %Y%M%D%H%N%S Input: 20160101233407
Output Format: %Y/%M/%D Corresponding Output: 16/01/01
|
![]() | 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) |
Input Format: %Y-%M-%D %H:%N:%S Input: 1997-04-09 14:23:03
Output Format: %d/%m/%Y %H:%N:%S.%L Corresponding Output: 9/4/1997 14:23:03.000
|
![]() | Click Here to View Example 4 - Input format = Date (DD/M/YY) >> output format = Date (DD/MM/YYYY) |
Input Format: %d/%m/%y Input: 10/5/98
Output Format: %D/%M/%Y Corresponding Output: 10/05/1998 |