Usando el mismo código que la semana anterior, solo usaré los formatos para mostrar las fechas usando nuestro idioma español. Para ello utilizaremos la OPTION LOCALE y también las funciones específicas asociadas
options locale=es_es;
y ahora use los FORMATOS NLDATE (hay varios en SAS HELP CENTER: NLDATELw. Format) y la función put para guardar los valores.
¿Cómo saber el día de la semana? SAS Help Center: NLDATEWNw. Format
¿Qué semana del año? SAS Help Center: NLDATEYWw. Format
¿Qué es el Trimestre del Año? SAS Help Center: NLDATEYQw. Format
data boletos_2023;
set boletos_2023;
semana_do_ano = put (vencimento, nldateyw20.);
trimestre = put(vencimento, nldateyq200.);
dia_da_semana = put (vencimento,nldatewn10.);
run;
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.