converting am to hours

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
mab_arif16
Charter Member
Charter Member
Posts: 87
Joined: Sat Mar 18, 2006 11:45 pm

converting am to hours

Post by mab_arif16 »

Hi
I have arequirement to convert MMM DD YYYY HH:MM:SS AM orPM
to mm/dd/yyyy HH:MM:SS
I cant use a basic transformer for ICONV and OCONV
I am trying to use string to timestamp fn but its not working out.
Any suggestions
Thanks
:roll:
Last edited by mab_arif16 on Tue May 16, 2006 11:27 am, edited 1 time in total.
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Re: converting am to hours

Post by us1aslam1us »

mab_arif16 wrote:Hi
I have arequirement to convert MMM DD YYYY HH:MM:SS AM orPM
to mm/dd/yyyy HH:MM:SS
I cant use a basic transformer for ICONV and OCONV
I am trying to use string to timestamp fn but its not working out.
ARif
Can you tell us what is the exact function you are using and what exactly is the error,so that someone could help you.

Thanks
Sam
mab_arif16
Charter Member
Charter Member
Posts: 87
Joined: Sat Mar 18, 2006 11:45 pm

Re: converting am to hours

Post by mab_arif16 »

I am trying to use it in modify stage.
Date4:Timestamp=StringToTimestamp(Date1)
The error is
main_program: Error parsing modify adapter: Error in binding: Unknown conversion: StringToTimestamp
Expected destination field selector, got: ")"; input:
Date4:Timestamp=StringToTimestamp(Date1)
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post by us1aslam1us »

mab_arif16
Charter Member
Charter Member
Posts: 87
Joined: Sat Mar 18, 2006 11:45 pm

Post by mab_arif16 »

Thats the same thing I tried
Does something need to be changed here before the equation and can this be used in modify stage
Date4:Timestamp=StringToTimestamp(Date1)
Thanks
Arif
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Why can't you use a BASIC Transformer? It's there, it's part of your tool kit.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Sathish
Participant
Posts: 17
Joined: Tue Aug 10, 2004 3:23 pm

converting am to hours

Post by Sathish »

Hi all
I need to convert MM/DD/YYYY HH:MM:SS AM or PM to DB2 Timestamp.
Is there any function available to do this.
I really appreciate any suggestions on this.

I'm on Windows Server Edition 7.5x2

Thanks
Sathish
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Etiquette Note
We do not hijack threads. Please start a new thread with your new question.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply