DomIns
Posts: 3
|
| Posted: 11/04/2006, 10:54 AM |
|
Hi,
I am new to CodeCharge Studio and currently using the trial period. I am liking the product very much so far.
I'm creating a report from a MySQL database and I have two fields (From, To) to search by date.
The date is stored as YYYYMMDD (e.g. 20061104) in the MySQL database. The MySQL field is 'Date_Registered'.
The From field is s_Date_Registered and the To field is e_Date_Registerd.
I have added the following conditions to the WHERE clause in VQB (Condition Type: Parameter)
(Date_Registered >= s_Date_Registered AND
Date_Registered <= e_Date_Registered)
When I run the search and include a From and To date, I get the following message:
"The value in field url e_Date_Registered is not valid. Use the following format: ShortDate."
If I run the search with only the From date, I get:
"The value in field urls_Date_Registered is not valid. Use the following format: ShortDate."
I have tried changing the format to ShortDate but it still doesn't work.
What am I doing wrong?
Thanks,
Dominic
|
 |
 |
Edd
Posts: 547
|
| Posted: 11/06/2006, 4:11 PM |
|
Dominic
Dates are always a problem - my suggestion is stick to the yyyymmdd standard:
Therefore in your search format - have the dates as your local format DD/MM/YYYY or MM/DD/YYYY (avoid short dates they always give me grief)
In the parameters of the grid look at the formats of how that dates are passed input "s_Date_Registered" and "e_Date_Registered" should be your local format (DD/MM/YYYY or MM/DD/YYYY) but the format being passed to the database should be YYYYMMDD
Edd
_________________
Accepting and instigating change are life's challenges.
http://www.syntech.com.au |
 |
 |
DomIns
Posts: 3
|
| Posted: 11/07/2006, 5:53 AM |
|
Hi Edd,
Thanks for the response. I got my report to search using the date range.
I changed the field type from 'Date' to 'Text' for the From/To date fields since I store the date in MySQL as YYYYMMDD and the field is defined as VARCHAR in MySQL and not as DATE.
Thanks,
Dominic
|
 |
 |
Jason Tarabay
|
| Posted: 11/22/2006, 6:39 AM |
|
Dominic
I'm trying to find out how to do a date range at all? If you can help that would be great. Thanks.
|
|
|
 |
|