Converting a string to date/time data type

Contents[Hide]

1. Overview

This article shows you how to set up the date/time data type from an Excel sheet or flat file data connector.

2. Connect to a flat file or Excel file

To import a flat file or an Excel file, follow the steps in Drag and drop an Excel file.

You may also want to create a data connector yourself for an Excel file or flat file.

3. Setting up the date/time data type

In this example, the date column is defined as only numbers, which was interpreted as containing ordinary numbers in each row. You may have dates in another format that includes other characters and was interpreted as ordinary string (text) values instead of dates.

Before Change of Data Type
Before Change of Data Type

Once the data connector has been placed, right-click on the uploaded data connector, and select Edit.

Edit Data Connector
Edit Data Connector
 

Click on Define structure near the bottom of the dialog.

Define Structure
Define Structure
 

 Select the table name or sheet with the column you want to edit.

Tables
Tables
 

Select the column you want to edit. If the columns are not shown, click on Re-discover table.

Columns
Columns

Under the selected column, under Data Type, select Date/Time.

Data Type of column
Data Type of column

Once the data type has been selected, the Date Format input shows. Enter the format used by the dates in this column of the file.

Date format
Date format

Click the submit button at the bottom of the dialog to save the changed information.

The data will be changed into a date format.

After changing the data type
After changing the data type

4. See also

Dundas Data Visualization, Inc.
500-250 Ferrand Drive
Toronto, ON, Canada
M3C 3G8

North America: 1.800.463.1492
International: 1.416.467.5100

Dundas Support Hours: 7am-6pm, ET, Mon-Fri