Video Screencast Help

Convert String To Date

Created: 13 Jun 2012 • Updated: 10 Jul 2013
Language Translations
Collaborators: SymantecWorkflowTeam, Chan Eil Fhios
SymantecWorkflowTeam's picture
0 0 Votes
Login to vote

Convert String To Date

Component definition

The Convert String to Date component evaluates a text string. If the data is valid (can be converted to a date), the Convert String to Date component converts the text string to the date-time format specified. By default, the format for date-time conversion is MM/DD/YYYY HH:MM:SS (month, day, year, hour, minute, second). You can alter the format to meet your needs. The format must be an accepted date-time format from the Microsoft .NET Framework Class Library. This library is linked to in the component's Help screen.

Component icon


Description of component output paths

Unknown

The component output paths are described in the following table:


Property

Description

Unknown

Unknown

Unknown

Unknown

Description of component tabs and their properties

The properties on the Convert tab in the Convert String To Date component are listed and described in the following table:


Property

Description

Input Variable Name

Unknown

Output Variable Name

Unknown

The properties on the Formatting tab in the Convert String To Date component are listed and described in the following table:


Property

Description

Exact Datetime Format

Unknown

The properties on the Settings tab in the Convert String To Date component are listed and described in the following table:


Property

Description

Component Class Name

The class name of this component. This property is not editable, but useful if you call Symantec support.

Description

The description of this component. This property lets you describe how the component is used. You can use it to provide any wanted
documentation for this component.

This description is included in
the model reports that are created when you click Plugins > Generate Business Model.

Location

The physical location of the top left point of this component on the
workflow model.

Name

The name of this component. You can change the name.

If you changed the component name when you double-clicked it on the workflow model, the changed name appears here.

Override Background Color

This property lets you change the background color of this component.

To Do

This property lets you record what you still need to do with the
component. Use this property to help you remember the configuration that you want to apply to this component.

The text that you enter for this property appears at the bottom of the component editor. If you enter text for this property, a checklist symbol appears on the component in the workflow model.

Is Enabled

This property lets you enable or disable the component. By default,
components are enabled. When a component is disabled, it has no
effect on the Project. Uncheck Is Enabled to disable the component.

  • Execution Outcome

    If a component with more than one outcome
    path is disabled, you must select which outcome path you want the component to take. Click the Execution Outcome drop-down list and select the outcome path for the workflow to follow.

  • Disabled Mapping

    If the component has output parameters, you must configure all output parameters with fixed data to pass on. This configuration can be performed in the Disabled Mapping option.

Connection information

Not applicable

Component settings

Unknown

Use cases

An example for the Convert String To Date component is as follows:

  • Database switch

    A date variable is converted from string type in existing data to date type to meet the data requirements of a new database

Database switch

Scenario: The HR department needs a new database for employee records. The old database stored the dates as strings (for example, March 13, 1998). The new HR database stores dates as true date-time data types. Therefore, the string dates need to be converted before their insertion into the new database.

Process: This process is built in a Workflow project.

The following screen shot shows the process:

The process begins with a custom component that obtains the set of employee records, each having a string format HireDate value. The record set is sent to the For Each Element in Collection component. It then delivers the records one at a time to the Convert String to Date component.

The Convert String to Date component takes in the variable CollectionOfEmployees.HireDate and converts its value to the format that is specified on the Formatting tab. For this example, the format MM-DD-YYYY is used.

The following screen shot shows the Convert String to Date editor:


You can leave the Exact Datetime Format box empty. If you leave it blank, the component uses MM/DD/YYYY HH:MM:SS as the default format.

After each record's date format converted, the For Each Element in Collection component delivers the updated record to the custom InsertRecordsInNewDB component. The custom InsertRecordsInNewDB component inserts the record into the new database.

Other components in this example are as follows:

  • Custom component

    This component was created with the integration engine.

    For more information on the integration engine, see the Workflow Solution Administrator's guide.

    www.altiris.com/support/documentation.aspx

  • Form Builder

  • Send Email