convert timestamp field in Teradata into format 'MMM-YYYY'

Connectivity
Enthusiast

convert timestamp field in Teradata into format 'MMM-YYYY'

Hi All,

I am trying to convert a timestamp field in Teradata into format 'MMM-YYYY'

or 'Mon-YYYY' in Reportstudio within the data item expression

Regards,
Sony

2 REPLIES
Teradata Employee

Re: convert timestamp field in Teradata into format 'MMM-YYYY'

What is Reportstudio?

I tried this in BTEQ

select CURRENT_TIMESTAMP (FORMAT 'MMM-YYYY');

*** Query completed. One row found. One column returned.
*** Total elapsed time was 1 second.

Current TimeStamp(6)
--------------------
Oct-2007

Following expression should work if you are accessing Teradata database with ODBC or .NET Data Provider.

select CAST((CURRENT_TIMESTAMP (FORMAT 'MMM-YYYY')) AS VARCHAR(25));

Enthusiast

Re: convert timestamp field in Teradata into format 'MMM-YYYY'

Yes shaw you are right. It works in Teradata but in Cognos Report Studio it is not working.

Many Thanks,
Sony