Quote:
Originally posted by gsinha
Hi
I am new to the Db2 Stored procedure so would like to get some help on it
I am writing an Outbound script to output data from my Db2 Contact table in a flat file. The Field Date value is stored as 2003-10-14 17:17:54.333 (date and Timestamp)
I would like to get an output value of 031014 in my flat file.
Can some one write an SQL Procedure for me...
Any help would be appreciated
Thanks
Gautam S
|
You don't need a stored procedure,
substr(datefield,3,2) concat substr(datefield,6,2) concat substr(datefield,9,2) will return the string you want.
Hope this helps