close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

search wizard date range problems

Thread began 4/27/2010 10:02 am by mr hankey | Last modified 4/30/2010 3:52 pm by mr hankey | 1343 views | 10 replies |

mr hankey

search wizard date range problems

Hi,

I added the data assist search qizard to my clients results page and it worked great.

Only thing is though, when i added date range to my search form it displays as mm/dd/yyyy

i want to be able to seach using dd/mm/yyyy on the web page but search the mysql database which is yyyy/mm/dd

the other thing i was wondering was, would it be possible to seach on just the year part of the date range rather than the full dd/mm/yyyy ??

appreciate your help.

thanks

Sign in to reply to this post

mr hankey

Could someone from WA support help me get this search date range into uk format please?

Many thanks

Sign in to reply to this post

Eric Mittman

The date format that you can enter to perform a date search should not matter. In my testing with my date type columns I was able to search with the dd/mm/yyyy format without issue. What are you experiencing?

It might be possible to search on just the year portion, it would be a little custom though. It would be tricky if the user can enter a full date or the year, if they are only selecting a year then it would be a bit easier. Using a select list for the years would be best for this.

Sign in to reply to this post

mr hankey

thanks eric, can you help me impliment just searching the year of my date column in database?

as for seaching with dd/mm/yyyy it does not work. by default when i run the wizard i end up with my date range input fields and besides them it says mm/dd/yyyy

if i seach the field with someones birthday of say 30/11/1980 it returns 0 results even though there is a result for this. however if i search 11/30/1980 it returns the matches fine.

so it does matter and i need it to support uk format please?

many thanks

Sign in to reply to this post

Eric Mittman

To be able to search using UK formated values you will need to update the value in the DataAssist Search server behavior for your date elements. You can update them like this:

php:
date("Y-m-d", strtotime($_POST["date1"]))



You would need to ensure that it is your date field that is referenced. As for searching by year only the best way to do this would be to have a select list with the labels set to years, but the values set to January 1st for that year, like this:

php:
<select name="select1" id="select1">

      <option value="1-1-2005">2005</option>
      <option value="1-1-2006">2006</option>
    </select>


If you need any help with formating the date to work with UK dates post back with your results page and let me know what the date fields are called.

Sign in to reply to this post

mr hankey

thanks eric, not sure exactly where to add it.

i know it is php manipulation but i know the basics.

this is what i have on my results page for my search form at top:

$WADbSearch1->addComparisonFromEdit("App1DOB","StartDOB","OR",">=",2);
$WADbSearch1->addComparison("App1DOB","".WAQB_getEndDate($_POST["EndDOB"]) ."","AND","<=",2);


and in the helper.php file inside the Search folder i have this:

$theValue = WA_DBS_PostOrGetField($EditName);

can you help me add what i need to have it in uk format please?

thanks

Sign in to reply to this post

mr hankey

could someone get back to me please?

i am not comfortable editing code generated from the data assist wizard as dont know much php.

i just want it to be in uk format please.

thanks

Sign in to reply to this post

Eric Mittman

Post back with your results page and let me know what the date fields are called.

Sign in to reply to this post

mr hankey

eric,

i cannot post my results page on this as this is for an important client and i cannot post their site code.

more than happy to privately email it to you if you give me your email address.

i dont understand why this problem is dragging on.

why cant you run through thr search wizard and specify the date format for your site i.e US or UK etc.

the extensions at this moment in time are not making things quick and i would really hope to have this resolved today as this is dragging on now.

i have been told by jimmy that the above is what needs modified in the helper file and results page.

but i do not know php and this is why i bought the extensions membership.

i am slightly dissapointed with this as the UK support seems alot of fiddling with code which i do not know.

i am just getting around mysql as i go along and i would love to in an ideal world sit and go through php books but i dont have time as i need to work to make money for the family so please can someone at WA support just help me get things sorted to support UK and look at releasing fix files for to include for future for other UK users to use with the extensions.

thank you

Sign in to reply to this post

Eric Mittman

There is no current support for UK style dates within the DataAssist Search server behavior. To use these date formats will require editing of the results page at the least. I have posted an example of the edit that will need to be made two days ago. If you are unable to made the edit I can make it for you but I will need your page.

I have opened a ticket so that you can post back with the results page.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...