Hi All,
I want to change a string value (2009-12-13 10:10:25 ) to Timestamp(13/12/2009 10:10:25)
I tried StringtoTimestamp(Input,,"%dd/%mm/%yyyy %hh:%nn:%ss").
But this conversion function is not giving desired output for me.
Please Advise.
Thanks,
Kumar66
String to Timestamp
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You specified the delimiter incorrectly. It must be precisely specified.
Code: Select all
StringtoTimestamp(Input,,"%dd-%mm-%yyyy %hh:%nn:%ss")
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.
Read the error message in detail and change your format to:
StringtoTimestamp(Input,,"%yyyy-%mm-%dd %hh:%nn:%ss")
StringtoTimestamp(Input,,"%yyyy-%mm-%dd %hh:%nn:%ss")
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
i agree with what chulett said , i also was confused about that before , but now take it as a rule , the mask for the function is telling the function how the input is passed to you and further the function understand the input to manipulate it
Mohmmed Elgendy
Senior System Analyst
Data IntegrationTeam
Etisalat Egypt
+20 1118511161
Senior System Analyst
Data IntegrationTeam
Etisalat Egypt
+20 1118511161
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
That is precisely correct.kumar66 wrote:Data string '2009-12-13 08:57:45' does not match format '%dd-%mm-%yyyy %hh:%nn:%ss'
Just look at it!
Then proceed as Arnd advised.
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.