Hi Friends,
I am having two fields A(TIMESTAMP) and B(TIMESTAMP) in source and and in target I have column C( A-B) which data type should I mention here, if the column C is Decimal it is giving me a phantom error.
can anyone gimme a solution to fit this condition.
Thanks & regards
Karthik Chandra goutam
DATA TYPE ISSUE
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
There are no data types in server jobs, therefore an attempt to subtract two timestamps is undefined. You need to convert them to some numeric format (for example seconds) and subtract those. In what units should C be?
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.
ray.wurlod wrote:There are no data types in server jobs, therefore an attempt to subtract two timestamps is undefined. You need to convert them to some numeric format (for example seconds) and subtract those. In wha ...
Can we do subraction of two DATE Data Type in server jobs?
can anyone help me...
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 40
- Joined: Sun Jan 21, 2007 1:52 pm
- Location: Chennai
- Contact:
Hi Kimbal,kimbal wrote:Hi..
we can convert A-data type to iconv and do the same for B also.after that we can subtarct the things.then finaly we can convert to oconv.i think it will solve your problem.kindly put your commands.
Regards
kimbal
Sound the same as Ray, it is how we handle,
Iconv(DATE1[1, 8], "D") - Iconv(DATE2[1, 8], "D") will give u diff btw dates, not TIMESTAMP, this can be edited and used. refer Iconv functions
regards
You can use this following in the derivation side
oconv(iconv(DSLink2.a,"MTS")- iconv(DSLink2.b,"MTS"),"MTS")
for example, A-11:20:30 and B-11:20:20 then C will be 00:00:10
you can has the target as sequential file. It can be stored as timestamp. try this and pass on your comments.
tks and cheers,
TSN
oconv(iconv(DSLink2.a,"MTS")- iconv(DSLink2.b,"MTS"),"MTS")
for example, A-11:20:30 and B-11:20:20 then C will be 00:00:10
you can has the target as sequential file. It can be stored as timestamp. try this and pass on your comments.
tks and cheers,
TSN
with regards,
tsn
tsn