Subject | Re: dateformat |
---|---|
Author | Adam |
Post date | 2008-05-11T12:00:31Z |
> Do you mean the change the format of the current date? If you meanNo, he means that date formatting is a presentation layer issue and so
> from another date format, eg. MM/DD/YY, then can you please let us
> know what format it is?
>
solving it at the database layer is not the best approach.
If you insist you want the database to format things, then it is
possible to do, but don't expect the dbms to do the dirty work for
you. You are going to need to use a combination of built in functions
(namely EXTRACT) along with the substring function along with the
concatenate operator ||.
So it is going to look like:
select
SUBSTRING(EXTRACT(WEEKDAY from SomeField) FROM 1 FOR 3) || '-' ||
EXTRACT(MONTH from Somefield) ... etc
from SomeTable;
Adam