Compute today's date in syntax

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

kermitthefrog
Posts: 1
Joined: Fri May 30, 2014 6:44 pm

Compute today's date in syntax

Postby kermitthefrog » Fri May 30, 2014 6:51 pm

I'm sure this is easy but I just can't find the answer. I want to compute a new variable with today's date. This code doesn't work so I'm obviously missing something. Thanks in advance.

COMPUTE DateToday=$DATE11.
EXECUTE.
RubenGeert
Posts: 100
Joined: Mon May 19, 2014 6:06 am

Re: Compute today's date in syntax

Postby RubenGeert » Fri May 30, 2014 7:44 pm

You're very close Kermit! Try this

compute today = $time.
exe.
formats today (adate10).

for an explanation, see http://www.spss-tutorials.com/date-variable/.

Kind regards,

Ruben Geert van den Berg
www.spss-tutorials.com

Who is online

Users browsing this forum: No registered users and 2 guests

cron