All Forums Analytics
Vimal 3 posts Joined 05/07
21 May 2007
Date Function

I want select month name and date from a date column. For Ex. My output should be '15-JAN'. Plz help me how to do it in Teradata, coz i am new to it.

Barry-1604 176 posts Joined 07/05
21 May 2007

You can do that like this:Select date_col (format 'DD-MMM') (CHAR(6))...

Vimal 3 posts Joined 05/07
21 May 2007

Thanks Barry... :-)

Andres Meek 1 post Joined 05/12
14 May 2012

When I copy/paste this dataset to excel, my years are completely messed up. For example, I have a field value = 12/01/12 being formatted with 'mmm-yy' and Teradata is returning Dec-12, but when I export it to excel ,it shows Dec-12. Any suggestions?

ulrich 816 posts Joined 09/09
14 May 2012

specify four digist years! There will be always confusion how it should be interpreted...

Dec-12 can be Dec 2012 or 12 day of December...

Never format a year with 2 digits ;->

feel free to donate bitcoin:12kgAUHFUqvG2sQgaRBXFhCwyf9HXdkGud

dnoeth 4628 posts Joined 11/04
14 May 2012

I agree, it's completely messed up:

"Teradata is returning Dec-12, but when I export it to excel ,it shows Dec-12"

;-)

Dieter

Dieter

You must sign in to leave a comment.