Tam
|
| Posted: 10/11/2004, 1:08 PM |
|
Hi there,
I have a datetime field in my database storing both date and time. As I create a grid and a search which has the date field (value get from datepicker), the search engine fails.
For example, I have a record with datetime field as 10/23/2004 7:34:00 PM. As I select a date from datepicker coming out 10/23/2004 to search, the grid return no record.
Is anyone know how to make it work? I am using PHP and MySql database. Thank you.
|
|
|
 |
RonB
Posts: 228
|
| Posted: 10/13/2004, 5:54 AM |
|
you have to reformat the date from the datepicker before sending it to mysql the search function I believe does not do this on itself. So make sure you "catch" the date and reformat it to the mysql format.
|
 |
 |
peterr
Posts: 5971
|
| Posted: 10/13/2004, 7:04 AM |
|
Do you have a problem with wrong date format in the textbox after selecting a date via Date Picker. Date Picker doesn't store dates in any format , just sumits it to a Textbox control.
Or do you have a problem with the Date Range - for example do you get results when you enter 10/24/2004 instead of 10/23/2004?
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
2467
Posts: 47
|
| Posted: 10/14/2004, 2:33 AM |
|
First don't change anything at your search field.
Select your grid and go to the Data ->DataSource and in DataSource Table click to your datatime field and than go to the Table Parameters.
Than use this example:
Name: datetime (your datetime field)
Type: date
Format: yyyy-mm-dd (so you must clear time ;))
Condition: contains ('like %...%')
Under parameter source:
use Url as Type
and format dd/mm/yyyy like datepicker default
This will solve your problem 100%
Greetings from Kosova
|
 |
 |
troy
|
| Posted: 06/20/2005, 3:46 AM |
|
hi there.
im using ccs. php,mysql.
i have a search and a grid wich i can seach for a date , and that works fine.
But what i want to do is search for dates between two dates.
for example:
i want to seach all dates between 23/06/2005 and 15/07/2005 for example.
from there i will send a email to users to remind them.
can any one help.
cheers...
|
|
|
 |
troy
|
| Posted: 06/20/2005, 4:17 AM |
|
hi there.
I have done it.
in the where section. i put:
cal_date >='{s_cal_date}' And
cal_date <='{s_cal_dateto}'
I made 2 search boxes one called cal_date and the other called cal_dateto
it all works good..
|
|
|
 |