Hi. I am new to TD coding. In DI Studio, I would like to convert 08JAN2020 date format to mm/yyyy and
use mm/yyyy for my grouping (ie by month/year only, ignore day of the month). In SAS I used this: INPUT(PUT(date,mmyys7.),anydtdte7.
It looks too exotic but it worked good to just give me month/year.
How would I get to the same date value in teradata? Thanks!
(Is this the correct forum for TD questions?).
Thanks! I will try to get on that TD forum for my specific questions. I have always gotten helpful information here!
That worked, giving me 1Jan2020, which with the monyy7. format, displays "Jan2020". Perfect. Thanks.
It looks like you just want to move to the first day of the month. So in SAS you would just do:
intnx('month',date,0,'b')
For Teradata questions you should ask on a Teradata forum. But looking around quickly I found this post that seems to do what you want.
DATE - (EXTRACT(DAY FROM DATE)-1)
https://support.teradata.com/community?id=community_question&sys_id=2bba0b6f1b97fb00682ca8233a4bcba5
Thanks! I will try to get on that TD forum for my specific questions. I have always gotten helpful information here!
That worked, giving me 1Jan2020, which with the monyy7. format, displays "Jan2020". Perfect. Thanks.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.