Date search

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
paolcon
User
Posts: 15

Date search

Post by paolcon »

Hi everybody, can you help me? Your product is realy the top, but i'm not.

I have a Datatime field "Service Date",
un search parameters i set

FieldSearch 1 >= (ServiceDate)

FieldSearch 2 <= (ServiceDate)

Can i set in default metodh FieldSearch2= (ServiceDate)+7 days ? example: FieldSearch 1 2016/05/09 and FieldSearch 2 in automatic 2016/05/16

Thanks


motfs
User
Posts: 258

Post by motfs »

You can use the Recordset_SearchValidated server event to check if there is <Field>.AdvancedSearch.SeachValue2. If there is no value, you can get the SearchValue and convert it to DateTime and use DateTime.AddDays() to add the number of days. and convert it back to string (ToString(<format>)) and set the SearchValue2. See Server Events and Client Scripts -> Recordset_SearchValidated (Example) in help file for more details.


Post Reply