Datetimeoverflow error
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 16
- Joined: Sun Apr 17, 2005 11:27 pm
Datetimeoverflow error
Hi,
I am using DB2 as my target database.I am appending the timepart from the source datetime field with the currentdate like:
DSJobStartDate:' ':Substring(datefield,12,19)
If I do like
DSJobStartDate:' ':'00:00:00' the job is running fine.
But for the first one, it is giving the datetimeoverflow error.
Please suggest how to go with this.
Thanks,
Poornima
I am using DB2 as my target database.I am appending the timepart from the source datetime field with the currentdate like:
DSJobStartDate:' ':Substring(datefield,12,19)
If I do like
DSJobStartDate:' ':'00:00:00' the job is running fine.
But for the first one, it is giving the datetimeoverflow error.
Please suggest how to go with this.
Thanks,
Poornima
-
- Participant
- Posts: 16
- Joined: Sun Apr 17, 2005 11:27 pm
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 16
- Joined: Sun Apr 17, 2005 11:27 pm
Hi Ray/Amsh.Thanks.
Even still the error persists.For a safer side, I put
Substrings(
DSJobStartDate:' ':Substring(datefield,12,9) ,1,19)
Still it remain the same.
As I mentioned, this work if I hardcode '00:00:00' for that last part instead of substring.But then my requirement is failing.
Thanks,
Poornima
Even still the error persists.For a safer side, I put
Substrings(
DSJobStartDate:' ':Substring(datefield,12,9) ,1,19)
Still it remain the same.
As I mentioned, this work if I hardcode '00:00:00' for that last part instead of substring.But then my requirement is failing.
Thanks,
Poornima
Hi,
Why not use the subtring operator [start,length] ????
link.col[1,10] : " 00:00:00"
should give you "2005-08-02 00:00:00" for today as date using YYYY-MM-DD format.
Doesn't that maco return an internal date format?
Why not use the start timestamp macro?
IHTH,
Why not use the subtring operator [start,length] ????
link.col[1,10] : " 00:00:00"
should give you "2005-08-02 00:00:00" for today as date using YYYY-MM-DD format.
Doesn't that maco return an internal date format?
Why not use the start timestamp macro?
IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
![Image](http://www.worldcommunitygrid.org/images/logo.gif)
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
![Image](http://www.worldcommunitygrid.org/images/logo.gif)
Hi Poornima,
Will changing the expression to
Substrings(DSJobStartDate:' ':Substring(datefield,12,8) ,1,19)
make any change ?
(Changed the number of positions from 9 to 8 in the inner substring function.)
In any case - send the result of the substring to a flat file so you can see what you actually try to insert into the database. It often reveals the problem.
Regards
Peter
Will changing the expression to
Substrings(DSJobStartDate:' ':Substring(datefield,12,8) ,1,19)
make any change ?
(Changed the number of positions from 9 to 8 in the inner substring function.)
In any case - send the result of the substring to a flat file so you can see what you actually try to insert into the database. It often reveals the problem.
Regards
Peter
Last edited by peterbaun on Thu Aug 04, 2005 8:04 am, edited 1 time in total.
hello again -
something went wrong in the copy-paste.
To be clear -
Substrings(DSJobStartDate : ' ' : Substring(datefield, 12, 8), 1, 19)
something went wrong in the copy-paste.
To be clear -
Substrings(DSJobStartDate : ' ' : Substring(datefield, 12, 8), 1, 19)
Last edited by peterbaun on Thu Aug 04, 2005 8:04 am, edited 1 time in total.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
peterbaun, you need to check Disable Smilies in this post otherwise 8) will deliver the "cool" emoticon.
You can go back and edit your post and still accomplish this.
You can go back and edit your post and still accomplish this.
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.