Updating a Date Type Variable (Magic xpi 4.5)
Magic xpi lets you define variables to pass information in an integration project. Variables are defined as different types. One variable type is Date. These types of variables always contain a calendar date.
If you want to update this variable’s value by using the Flow Data Utility with a specific value, you must enter an expression that indicates the date and format you want. For example, to enter the date 21/06/2005, you must enter the following expression: '21/06/2005'DATE. The date format depends on the definition in the [MAGIC_LOGICAL_NAMES] section in your Magic.ini configuration file.
Note:
|
You can also use the Date() function to update a variable of type date. This function will update the variable with the current date.
|
The following example demonstrates how to update a flow variable with a specific date.
-
Open an existing flow or create a new flow in the Magic xpi Studio.
-
Add a flow variable to your flow and define its type as Date.
-
From the Toolbox pane, drag the Flow Data utility to your flow.
-
In the Flow Data Configuration dialog box, click New and add the following to the line in the table:
-
In the Update Expression column, click to open the Expression Editor.
-
Enter the required value (date), surrounded by single quotes, and type DATE next to it (with no space between the last single quote and the word DATE). Your entry should look like '21/06/2009'DATE.
-
Click Verify to check your expression.
-
Click OK to close the Expression Editor.
-
Click OK to finish the configuration.
-
Run the example flow.