Archives of the TeradataForum
Message Posted: Fri, 30 Apr 2004 @ 17:10:21 GMT
I thought that the date part was the most difficult in such calculations! To get the time part is relatively easy because the remainder left after the division is within the INTERVAL data type. It means you can CAST it to timestamp using the built-in conversion mechanisms in Teradata and don't need any special formulae.
As I am away from TD until Monday I would not want to produce the exact example without being able to check the syntax but I would like to redirect you to a few examples suggested by Dieter in
They show how to convert INTERVAL to TIMESTAMP in the context very similar to yours. As Dieter noted, please be aware that the exact syntax might slightly vary for your release.
There is also an excellent overview of dates and times by Geoffrey Rommel:
Hope this will help you finish the conversion.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 23 Jun 2019|