Hi,
I have a field 'A' coming in from the source as varchar2(16)
The values is 200702231233 actually it's a datefield.
I need to convert it into timestamp with the fallowing format
2007-02-23 12:33:00
basically when I perform conversion I need to concatenate seconds.
I used string to timestamp functions in different ways but none of them are working.
Moreover the values are getting with ************* marks when I use conversion functions.
Any thaughts on this?
timestamp
Moderators: chulett, rschirm, roy
-
- Charter Member
- Posts: 822
- Joined: Sat Sep 17, 2005 5:25 pm
- Location: USA
What is the syntax you are using? Try something like this:
Check for Null values before doing any conversions.
Code: Select all
StringToTimestamp(A[1,4]:'-':A[5,2]:'-':A[7,2]:' ':A[9,2]:':':A[11,2]:"00.000","%yyyy-%mm-%dd %hh:%nn:%ss.3")
I haven't failed, I've found 10,000 ways that don't work.
Thomas Alva Edison(1847-1931)
Thomas Alva Edison(1847-1931)
or something like
Code: Select all
StringToTimestamp(in.Col,"%yyyy%mm%dd%hh%nn")
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
-
- Charter Member
- Posts: 822
- Joined: Sat Sep 17, 2005 5:25 pm
- Location: USA