Hello All,
Below is a varchar and i need to convert it to timestamp length 23, scale 3..
2009-01-15T00:08:13.109.
I used the below code and it doesnt work...
StringToTimestamp(DSLink316.DATE,"%yyyy-%mm-%dd %hh:%nn:%ss")
Any idea on the right code??
Thanks
Varchar to Timestamp Conversion
Moderators: chulett, rschirm, roy
StringToTimestamp(DSLink316.DATE[1,10]:' ':DSLink316.DATE[12,12],"%yyyy-%mm-%dd %hh:%nn:%ss.3")
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
Craig - you gave away the secret
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Just curious (and unable to check at the moment) - can you include the literal T in the format string? That would yield a simpler and self-documented solution.
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.