Hi.
I have to convert date to timestamp format.
Input:
Date format: yyyy-mm-dd
SQL type: Date(10)
Output:
Timestamp format : yyyy-mm-dd-00.00.00.000000
SQL type : Timestamp ,length-26, scale-6
Example:
input: 9999-12-31
Output: 9999-12-31-00.00.00.000000
I have gone through previous posts but could not get it working. Tried different functions in transformer and modify stage. I could not get the microsecond part. the output I am able to get is 9999-12-31-00.00.00
Thanks for the help!
Timestamp from date
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 644
- Joined: Sat Aug 26, 2006 3:59 pm
- Location: Mclean, VA
Timestamp from date
Attitude is everything....
-
- Premium Member
- Posts: 644
- Joined: Sat Aug 26, 2006 3:59 pm
- Location: Mclean, VA
Thanks DSGuru..
..output timestamp has to be loaded in DB2 table as well as a file.
in Db2 table Ia m getting microseconds with timestamp_from_date function in modify stage but I am not getting microsecond part in file.
How can I change the output column format from timestamp to one you just specified.
Thanks
..output timestamp has to be loaded in DB2 table as well as a file.
in Db2 table Ia m getting microseconds with timestamp_from_date function in modify stage but I am not getting microsecond part in file.
How can I change the output column format from timestamp to one you just specified.
Thanks
Attitude is everything....
Its been a tough path dealing with dates on different Databases.
Working with similar situation, I adapt using user defined SQL or generate SQL with appropiate Conversion function.
In a latest job (Using SQL Server), I used getdate() function to generate the system date.
In another situation I used Oracle to_date(someval, 'yyyy-mm-dd') for loading and extract.
Hope that solves the situation giving a better work-around.
Working with similar situation, I adapt using user defined SQL or generate SQL with appropiate Conversion function.
In a latest job (Using SQL Server), I used getdate() function to generate the system date.
In another situation I used Oracle to_date(someval, 'yyyy-mm-dd') for loading and extract.
Hope that solves the situation giving a better work-around.
-
- Premium Member
- Posts: 644
- Joined: Sat Aug 26, 2006 3:59 pm
- Location: Mclean, VA