Skip to Content
author's profile photo Former Member
Former Member

Getting system date into control variable(PAS)

Hi there everybody,i'm to trying to get the system date into a control variable from within a PAS procedure, and then extract year and month from this value in order to use them as filters to a query, by doing this the procedure can be scheduled monthly to read and load only data that corresponds to the actual month and year,can anybody give me some advice? I just got the date into a control variable using this code:

SET CONTROL fecha CLOCK

But i want to extract the components like year and month from this value, or get the year and month values in 2 separate variables.

I will be very thankfull if anybody can help me.
Greetings from Guatemala!

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 30, 2013 at 04:49 PM

    Answering my own question: i was trying to use get the system date in a variable, beacause i wanted to use the actual date automatically in the schelued PAS procedures in the "SET PERIOD instruction", so i wanted to do something like "SET PERIOD SYSDATE" or "SET PERIOD NOW" for example, after some research i found that it can be done using the "today" keyword, the instruction is : SET PERIOD TODAY.

    Thanks to the people who read this, regards.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.