Some time ago I had to write a function to create a special format for dates
in spanish like dd-mmm-yyyy
I'm sure you can adapt this to get the function you need
CREATE FUNCTION FFF.DATE3( fec DATE )
RETURNS varchar(11)
------------------------------------------------------------------------
-- SQL UDF (Scalar)
------------------------------------------------------------------------
F1: BEGIN ATOMIC
RETURN SUBSTR(DIGITS(DAY(fec)),9,2) || '-' ||
SUBSTR('EneFebMarAbrMayJunJulAgoSepOctNovDic',MONT H(fec)*3-2,3) || '-' ||
SUBSTR(DIGITS(YEAR(fec)),7,4);
END
Diego
"yogi" <yo*****@gmail.comwrote in message
news:d5**********************************@i7g2000p rf.googlegroups.com...
Hi,
I am working on a database that has a variable with timestamp
values. I wanted to convert the variable from timestamp to yyyy-mm-dd
format.
Thanks in advance
Yogi