0 - 4 of 4 tags for year

Hello everyone,
 I need to get the week of the year from a date, but 1st of Jan being the 1st week. (no matter what day it falls on). How can I get this in Teradata sql? For eg. 6 Jan 2013 is week 2.  Can someone please help?
Thank you so much.
San

 

Hi all,
PLZ look into this query
Create table ptemp.ateds as (
select a.ACCT_I,a.Open_D, a.Clse_D, year(a.clse_d) - year(a.open_d) as dte from pvdata.acct_base as a having a.open_d != null and year(a.Open_D) != 1111 and a.ACCT_I like '%SAV%' order by a.open_d desc) with data

Hi
My Source data has only two digit year when i am trying to convert to timestamp
sel cast('12/12/12 00:00:00' as timestamp(0) format 'MM/DD/YYBHH:MI:SS')
o/p
12/12/1912 00:00:00
tried with the current_timestamp(0)
eg:
sel cast(current_timestamp(0) as timestamp(0) format 'MM/DD/YYBHH:MI:SS')
o/p

These UDFs implement difference determination in months/years using smaller units of granularity, days/months, to accurately calculate the difference.