conversion of string to timestamp

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
pavans
Participant
Posts: 116
Joined: Sun Sep 10, 2006 7:33 am
Location: bangalore, india

conversion of string to timestamp

Post by pavans »

Hi how to convert string to timestamp in transformer.
Can you help me with an example.

I tried this:
StringToTimestamp(link name,["%yyyy-%mm-%dd %hh:%nn:%ss"])

but its giving me a parse error.
may be i am missing something here.
Thanks,
Pavan
sud
Premium Member
Premium Member
Posts: 366
Joined: Fri Dec 02, 2005 5:00 am
Location: Here I Am

Re: conversion of string to timestamp

Post by sud »

What is the format of the timestamp in the string? Can you post some sample data ?
It took me fifteen years to discover I had no talent for ETL, but I couldn't give it up because by that time I was too famous.
sud
Premium Member
Premium Member
Posts: 366
Joined: Fri Dec 02, 2005 5:00 am
Location: Here I Am

Re: conversion of string to timestamp

Post by sud »

pavans wrote:Hi how to convert string to timestamp in transformer.
Can you help me with an example.

I tried this:
StringToTimestamp(link name,["%yyyy-%mm-%dd %hh:%nn:%ss"])

but its giving me a parse error.
may be i am missing something here.
Just take out the [] :

StringToTimestamp(linkname.column name,"%yyyy-%mm-%dd %hh:%nn:%ss")
It took me fifteen years to discover I had no talent for ETL, but I couldn't give it up because by that time I was too famous.
Post Reply