Modification of the Timestamp format with PX
Moderators: chulett, rschirm, roy
Modification of the Timestamp format with PX
Hi,
I can't find the solution, that's why I need your help.
My input is a file and the format of my timestamps is:
"6/1/2002 01:00:00.000 PM"
I need to transform it to the following format:
"2002-01-06 13:00:00"
How can I do this with PX?
Thank you,
Pey
I can't find the solution, that's why I need your help.
My input is a file and the format of my timestamps is:
"6/1/2002 01:00:00.000 PM"
I need to transform it to the following format:
"2002-01-06 13:00:00"
How can I do this with PX?
Thank you,
Pey
Hello Peyote (sorry, I couldn't resist),
You wouldn't happen to be on the same project as me, in Nice? We are doing the exact same thing today so I was wondering...
Anyway, the Tx stage function that will do this is:
StringToTimestamp(InDate,"%yyyy-%dd-%mm %hh:%nn:%ss")
You wouldn't happen to be on the same project as me, in Nice? We are doing the exact same thing today so I was wondering...
Anyway, the Tx stage function that will do this is:
StringToTimestamp(InDate,"%yyyy-%dd-%mm %hh:%nn:%ss")
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
Sorry ArndW. I come from Lyon but I have a mandate in Canada.
Good word game, I never thought it.
Concerning your answer, I try it but in my Output, I have stars in place of the timestamp.
In input, I have the value "6/1/2002 01:00:00.000 PM" defined as Varchar(25)
and in output, I have "*******************" defined as Varchar or Timestamp (I tried both).
Have you have any suggestion to resolve this?
Thank you for your time.
Pey.
Good word game, I never thought it.
Concerning your answer, I try it but in my Output, I have stars in place of the timestamp.
In input, I have the value "6/1/2002 01:00:00.000 PM" defined as Varchar(25)
and in output, I have "*******************" defined as Varchar or Timestamp (I tried both).
Have you have any suggestion to resolve this?
Thank you for your time.
Pey.
Bonjour Peytot,
try writing to a PEEK or flat file and seeing if the value is written correctly, if YES then the answer is in the OCI stage & conversion, if not then the Px isn't parsing the date correctly. I use that function on incoming string data without the time portion and it works flawlessly.
try writing to a PEEK or flat file and seeing if the value is written correctly, if YES then the answer is in the OCI stage & conversion, if not then the Px isn't parsing the date correctly. I use that function on incoming string data without the time portion and it works flawlessly.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 82
- Joined: Thu Dec 02, 2004 10:27 pm
- Location: INDIA
Hi
I am not sure if you will like it. But this is what we are doing. And it works great. Yes we do process huge volumes of data.
We are using transformer's substring operations. Yes. Basically rip the 25 char string and build a sring of different format.
By any chance can you get your input in your desired format from your source system?? Doesn't hurt to ask your upstream folks.
Thanks
I am not sure if you will like it. But this is what we are doing. And it works great. Yes we do process huge volumes of data.
We are using transformer's substring operations. Yes. Basically rip the 25 char string and build a sring of different format.
By any chance can you get your input in your desired format from your source system?? Doesn't hurt to ask your upstream folks.
Thanks
dsxuserrio
Kannan.N
Bangalore,INDIA
Kannan.N
Bangalore,INDIA