search date

how i can set a preset period of dates?

for example

from 01/01/2010
to 02/02/2010

I want to set a default date that the user can then change if it wants.

Re: search date

Hello sir,

In Search Criteria, choose the data field, and choose the “between two values” .

Regards

Re: search date

my problem is to set a start date of default.

Re: search date

Hi,

fill your search fields:

{from_date} = date(“2010-01-01”);
{to_date} = date(“2010-02-02”);

More examples:

First day of month: date(“Y-m-d”)
Last day of month: date(“Y-m-t”)

Re: search date

Hi RHS,
perhaps I haven’t explained very well…I have a Date Field with Search Criteria = *Between 2 values.
How can I set defaults values ? Obviously the user must have the possibilty to change them.

Thanks a lot
Marco

Re: search date

Hi Marco,

try:

{your_date_field} = date(“2010-01-01”);
{your_date_field_2} = date(“2010-02-02”);

in Your Grid / Search / Events / onScriptInit

Re: search date

now works perfectly!

Thanks

Marco

Re: search date

Hi Friends,

In V6 I don’t found the option “*between two values”

Date : between [ ] and [ ]

Thanks,
Aquiles

Re: search date

@aquiles,

Well, I think I found it.

Please follow these steps:

  1. Go to the Project Explorer,
  2. Expand the Search item title,
  3. Click on the Search Criteria item,
  4. In the right pane, you will see the two listboxes.
  5. From the first listbox (left), select one of your desired field item,
  6. From the second listbox (right), select .Between two values, and then click on the Turn On/Off button and make sure the selected item in the second listbox has changed to become *Between two values.
  7. Save the changes, and then run the application.
  8. In the generated Search web page, when you select Between from the combobox, then you will see there is an additional textboxes control for the second date appears below the first textboxes control for the first date.

Hope that helps.

Sincerely,
Masino Sinaga

Hi,

May i know how to get the scriptcase search field variable name?( from date to date), i need this to include in my sql

Search based on two values (dates) is not working at all. It is knows bug and NetMake says it is not working but it is not a bug. They say it is not implemented feature. I need to do the same.

by the way my post is about 6 YEARS LATER AFTER ORIGINAL POST.

it simply shows NetMake does not care about you, they only care about releasing new version with even more bugs, very sad :frowning:

I don’t understand. i have used the data-between in search field and it worked well. But that’s no guarantee that there’s no error, but I don’t understand the reaction of Netmake or I’m misunderstanding the issue. SC support isn’t famous unfortunately. Have to agree on that.

aducom - I have tried that multiple times and as long as date is set in database as DATE() type the range search is not working. There is a setting in SEARCH to make search “Between 2 values”. that is what I’m talking about. Perhaps if you keep your dates as STRINGS then the search might work but then all DATE calculations will be impossible. Also users here reported that Quick Search on DATE() is not working so I’m surprised you say it works (or perhaps you gos mixed up somehow…)
I’m thinking about creating extra procedure to set FROM - TO global variables and pass those to the SQL query so the grid is displayed correctly. This possibly would be some workaround but the fact that such MAJOR FEATURE NOT WORKING really really sucks.

If you have some solution to that I would appreciate if you can share