Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 17th, 2003, 04:01 AM
Registered User
Join Date: Jul 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Urgent help! Compare a string to Sysdate in Oracle

I am trying to write a simple SQL statement which will take a string
(startdate) in the format DDMMYYYY and compare it to a date stored in
an Oracle database. My SQL is as follows:


"select * from tblhistory where datechanged = '" & startdate & "'"


The field datechanged in the Oracle database is set up using the
Sysdate variable, on a previous occasion.

Any ideas how I can get my startdate variable into the correct format
so that I can compare it with the 'datechanged' field?

Thanks in advance.

Old July 22nd, 2003, 01:48 AM
Authorized User
Join Date: Jul 2003
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts

(..a little late, but anyway) First of all, check what the datechanged field returns. i think that includes the hour except the date. So, i think you have to "clear" your database field before you can compare it with or get the startDate like Date & " " Time which returns something like 22/7/2003 9:48:16 pm

Kostas Lagos

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to subtract hours from sysdate in oracle mcmouli Oracle 4 January 7th, 2011 06:52 AM
string compare in table field alxtech SQL Server 2000 1 April 27th, 2007 12:25 AM
sysdate mateenmohd SQL Server 2000 3 September 28th, 2003 07:42 AM
Urgent help needed! Compare a string to Sysdate in WroteForLuck Classic ASP Professional 1 July 17th, 2003 06:11 PM
How to compare a string with the & sign in it? apd8x Javascript 3 June 13th, 2003 02:25 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.