All Forums Database
smith43017 7 posts Joined 11/10
06 Dec 2010
Needs to change DATE format

I am using V12 version I want export the data in dd/mm/yyyy format.

Expect the dates in format of :

04/20/2008

01/01/2008

I am getting result in format
4/20/2008
1/1/2008

Is there way to get results as desired format??

smith43017 7 posts Joined 11/10
06 Dec 2010

I am using SQL Assistant

Jimm 298 posts Joined 09/07
06 Dec 2010

You have to format the date and cast it as character.
Not sure how you get the dates to come out of SQL Assistant like that, but the following works fine for me on TD12:

cREATE VOLATILE TABLE T1
(PK smallint not null
, dt date not null)
on commit preserve rows;

insert into t1 values (1,'2008-01-01');
insert into t1 values (2,'2008-04-20');

select PK, Cast((Dt (Format 'mm/dd/yyyy')) as Char(10))
from t1;

smith43017 7 posts Joined 11/10
06 Dec 2010

I am trying to export the data into mm/dd/yyyy format.

smith43017 7 posts Joined 11/10
06 Dec 2010

Thanks for replay, I can use it while loading the data. :-)

Jimm 298 posts Joined 09/07
06 Dec 2010

It will export the data into mm/dd/yyyy format.

You must sign in to leave a comment.