469,623 Members | 969 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,623 developers. It's quick & easy.

substr function on timestamp datatype

Hi all,

does the substr function work with timestamp datatype columns. I wanted
to use it for padding the various columns for a report. I can live
without it :) .. though just wanted to know if it works with the
timestamp data type.

cheers,

Dec 18 '06 #1
1 8875
db2_d_b_a wrote:
Hi all,

does the substr function work with timestamp datatype columns. I wanted
to use it for padding the various columns for a report. I can live
without it :) .. though just wanted to know if it works with the
timestamp data type.

cheers,
Convert the timestamp to a char, then substr.
Also note that DB2 provides functions such as DAY(), MONTH() etc. to
extract pieces from a timestamp.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

WAIUG Conference
http://www.iiug.org/waiug/present/Fo...Forum2006.html
Dec 18 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by laurenq uantrell | last post: by
4 posts views Thread by Mark Harrison | last post: by
5 posts views Thread by Prabu Subroto | last post: by
2 posts views Thread by Baski | last post: by
3 posts views Thread by Soulless | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.