CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> Archive -> CodeCharge.Discussion

 searching dates

Print topic Send  topic

Author Message
jimmy cortes
Posted: 05/17/2001, 8:37 AM

I have made an application wich deals with dates. It was developed in ASP.
When I try to search on date fields, it seems it doesn´t work..!!!!
Help, pleaese

jimmy

Alexey Alexapolsky
Posted: 05/17/2001, 11:08 AM

Please describe in detail ,
can you see any error messages ?
how exactly you want your app to bahave ?
how does it behave now ?
what functionality do you want ?
what database do you use ?

--
Regards,
Alexey
CodeCharge Support


jimmy cortes <webmaster@virtuallinksa.com> wrote in message
news:9e0r75$c5c$1@mail.tankhill.com...
> I have made an application wich deals with dates. It was developed in ASP.
> When I try to search on date fields, it seems it doesn´t work..!!!!
> Help, pleaese
>
> jimmy
>
>

CodeCharge
Posted: 05/18/2001, 1:38 PM

Dates in MS Access
Here is one important point you need to be aware of - not all databases
handle the dates in the same way. Unfortunately Microsoft Access has very
special way of using dates in SQL queries and the standard Input parameters
will not work correctly. MS Access requires the dates to be formatted like
#06/04/01# and you need to convert the regular dates like 06/04/01 to MS
Access compatible date format.
If you use MS Access, go to the Events area of Form Properties, and enter
the following "Open" Event:
sWhere=replace(sWhere, "'" & GetParam("start_date") & "'", "#" &
GetParam("start_date") & "#")
sWhere=replace(sWhere, "'" & GetParam("end_date") & "'", "#" &
GetParam("end_date") & "#")

The Events in CodeCharge are similar to Events in MS Access and in certain
cases you may need to use them in addition to CodeCharge generated code.
The Open Event is a snippet of programming code or a function that will be
executed when the page is opened. Because CodeCharge stores the WHERE clause
in sWHERE variable, the above code converts CodeCharge generated WHERE
clause to use the "#" around the dates, which will satisfy MS Access. The
replace function used above is a standard Visual Basic and ASP function that
replaces one text with another. The GetParam function is a CodeCharge
generated function that obtains the value of the variable passed to the form
in the URL string.



"jimmy cortes" <webmaster@virtuallinksa.com> wrote in message
news:9e0r75$c5c$1@mail.tankhill.com...
> I have made an application wich deals with dates. It was developed in ASP.
> When I try to search on date fields, it seems it doesn´t work..!!!!
> Help, pleaese
>
> jimmy
>
>


   


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.