Data Transformation Services

Date Time String Transformation

The Date Time String transformation converts a date or time in a source column to a different format in the destination column.

The transformation is carried out in two steps:

  1. Each entry is converted in the source column to an OLE DB DBTYPE_TIMESTAMP data type. If the source column is a string type, a source date format string guides the conversion.

  2. The OLE DB DBTYPE_TIMESTAMP data type is converted to the destination column format. If the destination column is a string type, the destination date format string is used to format the resulting text.

If the source or destination column is not a string type, the corresponding format string is ignored.

The following standard date format strings are available:

If yours is not among the standard formats, create your own date format string using any of the following tokens.

Value Token(s)
Year yyyy, yy
Month MMMM, MMM, MM, M
Day dddd, ddd, dd, d
12 hour hh, h
24 hour HH, H
Minute mm, m
Second ss, s
Fraction f (may be repeated)
AM/PM Tt

Additionally, you may specify:

Note  All conversions use regional settings current on the instance of Microsoft® SQL Server™ running the package.

If the formatted result is too large to fit in a string type destination column, it is truncated.

The Date Time String transformation fails if:

To convert the format of a Date Time String transformation

Enterprise Manager

Enterprise Manager

See Also

DataPumpTransformDateTimeString Object

Date Time String Transformation Properties

DTS Transformations