DB2 date format
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
What is the value coming in from DSLink8.PROCESS_DT ?
Capture this using stage tracing or the Debugger or an extra output from the Transformer stage to a text file.
Capture this using stage tracing or the Debugger or an extra output from the Transformer stage to a text file.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
What is the source datatype? and what is the target db2 date format?
Depending upon your target format, use iconv and oconv function accordingly like
Depending upon your target format, use iconv and oconv function accordingly like
Code: Select all
Oconv((Iconv(DSLink8.PROCESS_DT,"DYMD")),"D-YMD[4,2,2]")
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Can you please also output Len(Fmt(DSLink8.PROCESS_DT, "L####/##/##")) and Quote(Fmt(DSLink8.PROCESS_DT, "L####/##/##")) so we can be sure there are no non-printing characters?
Although theoretically unnecessary, try being specific about the format in the Iconv() function.
Iconv(Fmt(DSLink8.PROCESS_DT, "L####/##/##"), "D/YMD[4,2,2]")
or
Iconv(Left(Fmt(DSLink8.PROCESS_DT, "L####/##/##"), 10), "DYMD")
Although theoretically unnecessary, try being specific about the format in the Iconv() function.
Iconv(Fmt(DSLink8.PROCESS_DT, "L####/##/##"), "D/YMD[4,2,2]")
or
Iconv(Left(Fmt(DSLink8.PROCESS_DT, "L####/##/##"), 10), "DYMD")
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
The output ofray.wurlod wrote:Can you please also output Len(Fmt(DSLink8.PROCESS_DT, "L####/##/##")) and Quote(Fmt(DSLink8.PROCESS_DT, "L####/##/##")) so we can be sure there are no non-printing characters?
Although theoretic ...
Len(Fmt(DSLink8.PROCESS_DT, "L####/##/##")) = 10
Quote(Fmt(DSLink8.PROCESS_DT, "L####/##/##"))
and I am not able to use the Quote and receiving message like
variable 'Quote' not defined.
Thanks in advance.
naren6876, add a parenthesis, the line is
Code: Select all
Quote(Fmt(DSLink8.PROCESS_DT, "L####/##/##")))
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
Craig - I guess I really can't count. Silly me.
Naren6876 - Please ignore my earlier post and follow Master Craig's suggestion.
Naren6876 - Please ignore my earlier post and follow Master Craig's suggestion.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
There IS a Quote function - I use it a lot.
Quote is not in DSParams, but you can put it there so that it should compile and run successfully. But DQuote or SQuote will serve as well for the current purpose.
Quote is not in DSParams, but you can put it there so that it should compile and run successfully. But DQuote or SQuote will serve as well for the current purpose.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: