All Forums Database
teradata006 8 posts Joined 03/12
29 Oct 2012
how to write Year(Date(Days({fn CURDATE()})-32)) in Teradata

Hi,
Can anyone help me in converting this :
Year(Date(Days({fn CURDATE()})-32)) in teradata
Thanks !

dnoeth 4628 posts Joined 11/04
29 Oct 2012

Probably:
extract(year from current_date - 32)
Dieter

Dieter

Qaisar Kiani 337 posts Joined 11/05
29 Oct 2012

If you want to extract year from the date - 32 days then this is the query

SELECT EXTRACT(YEAR FROM (CURRENT_DATE - INTERVAL '32' DAY))
You must sign in to leave a comment.