accepting (or prompting) a date

Discussions about editing and cleaning data
Forum rules
New release: CSPro 8.0
Post Reply
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

accepting (or prompting) a date

Post by AriSilva »

Hi folks,
I need to filter some questionaires, skipping (skip case) the ones with a field date below a certain date I would enter during execution time, like an accept, or a prompt,
The field type "date" exists in a form, but not in batch mode.
Best
Ari
Best
Ari
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: accepting (or prompting) a date

Post by Gregory Martin »

Can you just use prompt and give the user a format to enter the date. Something like:
numeric date;

while not datevalid(date) do
    string
text_date = prompt("Enter a date in the format: YYYY-MM-DD");
    date = tonumber(replace(text_date, "-", ""));
enddo;
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

Re: accepting (or prompting) a date

Post by AriSilva »

Sure, that's what I´m doing now.
I was just thinking about using some kind of a calendar date format, as in the form.
Best
Ari
Best
Ari
Post Reply