May 21, 2004 #1 vadimg IS-IT--Management Oct 25, 2001 152 US hi. i have a string date: '19981231' i need to get a date that's 1 year back from this date. what function would i use to convert this string into datetime and then minus 1 year from it? thanks!
hi. i have a string date: '19981231' i need to get a date that's 1 year back from this date. what function would i use to convert this string into datetime and then minus 1 year from it? thanks!
May 21, 2004 Thread starter #2 vadimg IS-IT--Management Oct 25, 2001 152 US ok, i actually decided not to be lazy and look up the syntax myself. i have add_months(to_date(char_field, 'yyyymmdd'),-12) is there something specifically for years, or should i just use months? Upvote 0 Downvote
ok, i actually decided not to be lazy and look up the syntax myself. i have add_months(to_date(char_field, 'yyyymmdd'),-12) is there something specifically for years, or should i just use months?
May 21, 2004 #3 carp MIS Sep 16, 1999 2,622 US I would use months - you code looks fine the way it is. Elbert, CO 1359 MDT Upvote 0 Downvote