Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. 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 Databases 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 May 10th, 2004, 08:09 AM
ppenn
Guest
 
Posts: n/a
Default Date Format problem in ASP

Hello, everyone

I am developing an ASP application connecting to Oracle 9i, to search a date field, the date stalled in Oracle as '02-May-1999', where users search would like to enter to search box as 02/05/1999, is there any function could convert to 02/05/1999.

Thank you in advance

Peter

 
Old May 10th, 2004, 05:58 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 344
Thanks: 0
Thanked 1 Time in 1 Post
Default

You can use the TO_DATE and TO_CHAR functions in Oracle, do a Google adn you'll find lots on the subject.
 
Old May 11th, 2004, 03:49 AM
ppenn
Guest
 
Posts: n/a
Default

Thank you for you reply.
I have tried To_Date; To_Char; alter session set NLS_DATE_FORMAT = 'dd/mm/yyyy' ;
All above functions work fine in Oracle, but once I run query in ASP, it keep tell me, not a valid month.

The follow statement, it gives 'missing expression'

Select Format$(CDate(Left([Dispatch_Date],10)),'dd/mm/yyyy') AS DispatchDate.


I wonder if there is any function(VBscript or javascript) in search box or query in ASP, to convert to 'dd/mm/yyyy' from Oracle's format 'dd-mmm-yyyy' .

Pete

 
Old May 11th, 2004, 06:35 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 344
Thanks: 0
Thanked 1 Time in 1 Post
Default

can you post some more of your code as it looks like you may have an issue with the SQL statement you pass to Oracle ? Have oyu tried capturing the SQL Statement in a string and printing it then seeing if it will run in SQL Plus ?





Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP Date Format apollon10 ASP.NET 3.5 Professionals 1 November 13th, 2007 05:54 AM
ASP/Access Date Format seananderson Classic ASP Databases 2 November 6th, 2006 02:15 PM
Date Format Problem cyberddindia Classic ASP Basics 2 October 23rd, 2006 01:49 AM
Date Format Problem Scripts82 Access VBA 2 March 13th, 2006 09:36 PM
date format in ASP ? mateenmohd SQL Server 2000 8 February 22nd, 2004 01:17 AM





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