--
Will Honea
You can always substring the date:
db2 "export to employee.del of del select empno,
substr(birthdate,1,4)||'/'||substr(birthdate,6,2)||'/'||substr(birthdate,9,2)
from emp"
"000010","1963/08/24"
"000020","1978/02/02"
"000030","1971/05/11"
"000050","1955/09/15"
"000060","1975/07/07"
"yyyy/mm/dd" is not of any international date format. the nearly is
ISO or JIS standard which is "yyyy-mm-dd". in your format, you are
on your risk for the import side and you cannot use sth. like modified
by dateiso.
values cast(replace(char(current date,ISO),'-','/') as char(10))
1
----------
2010/10/08
1 record(s) selected.
You'll have to use TO_CHAR to reformat your date in the select
statement,
not via an EXPORT option:
select TO_CHAR(CURRENT_DATE, 'YYYY/MM/DD') from sysibm.sysdummy1
1
----------------...
2010/10/07 ...
Hello Will,
Would this work for you? Having a dateformat modifier would be cleaner
indeed.
select to_char(timestamp_iso(date_column),'YYYY/MM/DD') from table
--
Frederik Engelen
Thanks, all. This was my brute force approach and seems to be the consensus
method. I just hated to cobble up a simple "select *" with the expanded form
on a 65 column table export - laziness loses again ;-)
--
Will Honea