Hi, new to teradata and working with date functions.
I need to get the prior sunday's date based on the current
date.
For example, for any date (mon-fri) would want the prior sunday's date. Current date = 2002-05-08 (yyyy-mm-dd)
from this would need a function to return 2002-05-05, prior sunday's date.
Not sure how to do this, have some examples using the
"add_months" fuction but not certain if I need to use that?
Any help would be much appreciated.
I need to get the prior sunday's date based on the current
date.
For example, for any date (mon-fri) would want the prior sunday's date. Current date = 2002-05-08 (yyyy-mm-dd)
from this would need a function to return 2002-05-05, prior sunday's date.
Not sure how to do this, have some examples using the
"add_months" fuction but not certain if I need to use that?
Any help would be much appreciated.