jtarabay
Posts: 13
|
| Posted: 09/18/2006, 12:25 PM |
|
I was wondering, I am searching for some dates...my issues are, I can search for a date and it will find every record with that date. In another instance the same search using a different date will not find any records, even though I know there are dates in the database that match the search criteria.
My other issue is that I wanted to do a search just on a month. Basically, the search would just look for birthdays during the month of 09...when I do it, I get this error:
The value in field s_Date_of_Birth is not valid. Use the following format: mm.
My other searches have been modified to get dates 09/2006, by making the search use mm/yyyy so I thought I could search by month by using mm but it is not working. If someone can please help me, I would appreciate it very much.
|
 |
 |
FrankR
Posts: 154
|
| Posted: 09/18/2006, 12:47 PM |
|
First off, how are you storing the dates, as real DB datetimes, or as strings?
If they are real datetimes, the searches should work fine with
db_column >= startofmonth and db_column <= endofmonth
If they are not real datetimes, you will need to create a format of the column looking like
YYYYMMDD
_________________
FR |
 |
 |
Jason Tarabay
|
| Posted: 09/19/2006, 6:09 AM |
|
All dates are stored as mm/dd/yyyy in the database. But as you know I don't want to search for dates using mm/dd/yyyy since I can't be that specific when looking for something. I need to be able to search by mm/yyyy and on one search I need to just search by mm. I'm not sure I understood what you asked me to try. Would is be possible to explain it a bit more.
|
|
|
 |
|