CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Search by date

Print topic Send  topic

Author Message
Arthur Dent
Posted: 02/20/2006, 3:19 PM

I have report page and I try to do an search by date.
Even I use correct dates, the search is showing nothing.
I readed this forum and tryed to find solution, but I did not get it work.
What could be wrong?

AD:-O
Benjamin Krajmalnik
Posted: 02/21/2006, 7:37 PM

It would be helpful if you post some of the code.
Difficult to hekp you without knowing the particulars.

What database are you using? How is CCS configured to send dates to the
backend?

Arthur Dent
Posted: 02/21/2006, 9:45 PM

Ok!

I have SQL Express.
The SQL is using yyyy - mm - dd format. (I think).
The CCS settings I have dd-mm-yyyy the local settings.
My computer have Finnish regional settings

All date fields and controls I have dd-mm-yyyy format and also the DBFormat is yyyy-mm-dd format in every field / control.

My report is showing example 25/01/2006 have record.
At SQL I can see it 25.01.2006 18:34:22

If use date search, and set date 25/01/2006 it shows nothing.

Then I created record with 04/04/2006.
At SQL I can see it 04.04.2006 0:00:00

Then I can use search 04/04/2006 and it will show record.
But then I added record 10/05/2006.
At SQL I can see it 10.05.2006 0:00:00

and then do the search by 10/05/2006 and I'll get error.
If I do the search by 05/10/2006, then I'll see the record.

Now I'm little bit confused, cause even I have the "s_date" in search form in dd-mm-yyyy format, why it works like this.

All help is needed, and thanks for replying.

AD


Benjamin Krajmalnik
Posted: 02/22/2006, 6:09 PM

You are having a common issue with internationalized SQL servers.

The problem is that SQL is getting confused due to regional settings.

Try changing the setting for the date format on the connetcion settings for
the server to"

yyyymmdd HH:nn:ss

This will force the queries to use a non-equivocal date format.

I have found that, depending on the webservers locale, the query may be sent
as yyyy-dd-mm and not yyyy-mm-dd.
I had the same problem with a customer in Australia.
By changing the date format to the above it resolved most of the problems -
all of the ones using the base CCS classes.

I had to make some other changes in my case to some code generated
constructs, but it is all working well now.



I this does not solve your problem let me know.

Arthur Dent
Posted: 02/22/2006, 9:20 PM

Hi Benjamin,

and thanks replying. This is getting worse.

I checked the connection and there I have SQL Server with
yyyy-mm-dd HH:nn:ss .

At settings on Design page I have this dd/mm/yyyy.

And still this works like I previosly written.

At SQL server the date column I have datetime. Should it be smalldatetime?

Please if you can help me with this cause the customer is coming today to see what I have done.

Anyway Thanks for the help!

AD
Arthur Dent
Posted: 02/23/2006, 10:50 AM

:-) I have solved my problem wih help of support team !

It was the SQL Express and the datetype problem.

Thanks to all who helped me:-D

AD

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.