Data Transformation Engine Design Studio Tutorial
Chapter 6 - Using the OR Function with a Lookup File MakePreferredData Map
Design Studio Tutorial
145
To enter the literal map rules
1 For the Company Field component of Customer, enter the literal company
names enclosed in quotation marks.
2 For the ID Field component, enter the literal text enclosed in quotation marks.
3 For the PurchaseDate Field, you must enter the literal text for the date and
convert this to a date time format using the
TODATETIME function (detailed
instructions on page 145).
4 To enter =NONE for the Customer(s) group type, from the Rules menu,
choose Insert NONE if Empty.
Using the TODATETIME Function
The TODATETIME function converts a text string of a specified format to a
date/time. The text string for the PurchaseDate Field on the PreferredFile
output card #1 is a 6-character numeric date text literal. For example, for
Customer[1] the text literal is "010322".
The syntax of the
TODATETIME function is
TODATETIME (
text_to_convert
[ , {
date_time_format_string
} ] )
♦ The
text_to_convert
is the text literal date you enter in the map rule.
♦ The
date_time_format_string
specifies the date time format.
! The default format for the
date_time_format_string
is
CCYYMMDDHH24MMSS.
! The text literal of
"010322" does not match the default date time format.
Therefore, you must specify the format of YYMMDD.
To convert the text literal to a date
1 In the PreferredFile output card #1 map rule for the PurchaseDate Field,
insert the
TODATETIME function.
=TODATETIME () appears in the Rule Bar