Date: Fri, 17 Aug 2007 10:54:54 -0600
Reply-To: "Workman, Rob" <Rob.Workman@SORIN.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Workman, Rob" <Rob.Workman@SORIN.COM>
Subject: Re: Show current time on an SAS/AF Frame
Content-Type: text/plain; charset="us-ascii"
Sorry, I forgot to add apostrophes. This time I tested it.
datetime.label = putn(date(), 'worddate.')||' '||putn(time(),
'time.');
How embarrassing!
Rob
-----Original Message-----
From: Stehle, James [mailto:James.Stehle@bea.gov]
Sent: Friday, August 17, 2007 11:51 AM
To: Workman, Rob; sas-l@listserv.uga.edu
Subject: RE: Show current time on an SAS/AF Frame
That produces the following compile error:
NOTE: Compiling TEST.FRAME (WORK.NEW.TEST.SCL).
ERROR 22-322: Expecting a name.
ERROR 22-322: Expecting a name.
NOTE: SCL source line.
3 Datetime.label = putn(date(), worddate.)||' '||putn(time(), time.);
- -
22 22
ERROR: Compile error(s) detected. No code generated.
-----Original Message-----
From: Workman, Rob [mailto:Rob.Workman@sorin.com]
Sent: Friday, August 17, 2007 12:37 PM
To: Stehle, James; sas-l@listserv.uga.edu
Subject: RE: Show current time on an SAS/AF Frame
James,
Use
Datetime.label = putn(date(), worddate.)||' '||putn(time(), time.);
In SCL Macros and Macro functions are compiled at the same time as the
frame.
Rob Workman
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Stehle, James
Sent: Friday, August 17, 2007 11:19 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Show current time on an SAS/AF Frame
I would like to display current time in a text label control on an
SAS/AF frame.
I have a frame with a text label control named DateTime.
The frame has the following scl:
init:
datetime.label="%sysfunc(putn(%sysfunc(date()),worddate.))
%sysfunc(putn(%sysfunc(time()),time.))" ;
return;
Test AF or executing the frame displays:
August 17, 2007 9:29:19
This is the time I compiled the frame. I would like the date and time
to show the current time and date when the application is used.