CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> General/Other

 CONVERT FUNCTION

Print topic Send  topic

Author Message
blackhat

Posts: 3
Posted: 02/23/2007, 6:23 AM

Hi there,
I need to convert one text field in date field.

I use the builder interface in order to create an ASP application. On step 6 I choose some of the fields like ListBox. One field is a text field but contain a date. I know is my database design but I can't modify the database.

The solution is to convert this text field in date format.

Basic I need to display some records if they are between the first date and second date.
I can't receive the correct number of records because the foieds are text fields.

Question: There is a way to write custom SQL queries ?

I need to build the SQL query like this

Select * from table where CAST(textfiled AS DATETIME) >= '2/21/2007' and
CAST(textfield AS DATETIME) <= '2/22/2007'

In the Visual Query builder, in the where clause I can't do that because I got an error like the operation is not allowed when the object is closed in classes.asp

Has anybody some ideeas?
Is very important. Thanks for your answers and... for the patience to read all that!

PS: Sorry I don't see is not allowe to put questions in the tips section!!!
_________________
Johnny be good!
View profile  Send private message
Waspman

Posts: 948
Posted: 02/24/2007, 3:36 PM

If the dates are specifed by the user in some kind of search page, capture the dates passed by the URL in a header or something on the results page and convert them into dates using cDate. Save them as session variables and use the to filter the results grid.

Hope that helps...tony;-)

_________________
http://www.waspmedia.co.uk
View profile  Send private message

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.

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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