Date: Sat, 30 Jul 2011 22:43:02 -0700
Reply-To: Jack Hamilton <jfh@STANFORDALUMNI.ORG>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jack Hamilton <jfh@STANFORDALUMNI.ORG>
Subject: Re: formatting/displaying dates in a format?
In-Reply-To: <000001cc4f42$e8e06e40$baa14ac0$@com>
Content-Type: text/plain; charset=utf-8
Create a CNTLOUT data set and print it instead of using the FMTLIB option.
FMTLIB is not a good choice in general - one of these days you will have a label value more than 40 characters long, and then you're going to get confused.
On Jul 30, 2011, at 10:30 PM, bbser 2009 wrote:
> Greetings!
>
> Running the code below gives me this table. I was wondering if there was a way to display those numeric values of START and END as dates, like 01jan2000.
> Thank you.
>
> Max
>
>
> â•ıƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂâ•
> â•˚ FORMAT NAME: DATES LENGTH: 11 NUMBER OF VALUES: 6 â•˚
> â•˚ MIN LENGTH: 1 MAX LENGTH: 40 DEFAULT LENGTH 11 FUZZ: STD â•˚
> ╡ƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂ╜ƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂ╜ƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂ╰
> â•˚START â•˚END â•˚LABEL (VER. V7|V8 30JUL2011:18:56:27)â•˚
> ╡ƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂË∫ƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂË∫ƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂ╰
> â•˚ 14610â•˚ 14700â•˚1st Quarter â•˚
> â•˚ 14610â•˚ 14791â•˚First Half â•˚
> â•˚ 14701â•˚ 14791â•˚2st Quarter â•˚
> â•˚ 14792â•˚ 14883â•˚3st Quarter â•˚
> â•˚ 14792â•˚ 14975â•˚Second Half â•˚
> â•˚ 14884â•˚ 14975â•˚4st Quarter â•˚
> ŠƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂ╒ƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂ╒ƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂƂł
>
>
>
>
>
>
> ==========
> proc format;
> value dates (multilabel)
> "01jan2000"d-"31mar2000"d = "1st Quarter"
> "01apr2000"d-"30jun2000"d = "2st Quarter"
> "01jul2000"d-"30sep2000"d = "3st Quarter"
> "01oct2000"d-"31dec2000"d = "4st Quarter"
> "01jan2000"d-"30jun2000"d = "First Half"
> "01jul2000"d-"31dec2000"d = "Second Half";
> run;
>
>
> proc format fmtlib;
> select dates;
> run;
|