473,406 Members | 2,954 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Date format from asp form to oracle database?

my database, sqlplus oracle, has a column ccexpiry, whch is set to date. In my form in asp, there will always be an error whenever i pass in a date that is not in the DD MMM YYYY which is the standard for oracle. My qn is how can i pass in a date that is in DD/MM/YYYY format?

This should be a common question, but i cant seem to find a working code. Can someone give me the codes please?

************************************************** ********************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
Jul 19 '05 #1
3 2777
You shouldn't try and pass a date in that format. How is the software
supposed to know if 06/08/2004 is June 8th or August 6th?

My recommendation: use an ISO standard format, rather than an ambiguous one.
e.g. YYYYMMDD or YYYY-MM-DD.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Michelle" <ch************@hotmail.com> wrote in message
news:uQ**************@TK2MSFTNGP11.phx.gbl...
my database, sqlplus oracle, has a column ccexpiry, whch is set to date.
In my form in asp, there will always be an error whenever i pass in a date
that is not in the DD MMM YYYY which is the standard for oracle. My qn is
how can i pass in a date that is in DD/MM/YYYY format?

This should be a common question, but i cant seem to find a working code.
Can someone give me the codes please?

************************************************** ********************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP &
ASP.NET resources...

Jul 19 '05 #2
<SCRIPT language="vbscript" runat="server">
Function ConvertToOracleDate(dtmDate)
If IsDate(dtmDate) Then
Dim arData(2)
arData(0) = Right("00" & Day(dtmDate),2)
arData(1) = UCase(MonthName(Month(dtmDate),True))
arData(2) = Year(dtmDate)
ConvertToOracleDate = Join(arData," ")
End If
End Function
</SCRIPT>

-dlbjr

Discerning resolutions for the alms
Jul 19 '05 #3
Take note of the other posts about universal date formats, then look up
TO_DATE() in the Oracle SQL documentation. TO_DATE is used to convert
strings in various formats to Oracle dates.

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Michelle" <ch************@hotmail.com> wrote in message
news:uQ**************@TK2MSFTNGP11.phx.gbl...
my database, sqlplus oracle, has a column ccexpiry, whch is set to date. In my form in asp, there will always be an error whenever i pass in a date
that is not in the DD MMM YYYY which is the standard for oracle. My qn is
how can i pass in a date that is in DD/MM/YYYY format?
This should be a common question, but i cant seem to find a working code. Can someone give me the codes please?
************************************************** ********************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP &

ASP.NET resources...
Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Colin Steadman | last post by:
I'm returning a date (5th Jan 2004) from Oracle using the following query: select TO_CHAR(invoice_date,'DD/MM/YYYY') from... This should return my date in the UK format, and it certainly...
1
by: jt | last post by:
I posted this yesterday, but I am not seeing this out yet: I am having problems with updating a date field in a certain format. The data is stored in an Oracle database. The date is...
7
by: vnl | last post by:
I'm trying to run a SQL query but can't find any records when trying to select a certain date. Here's the sql: SELECT field 1, field2, date_and_time, FROM table1 WHERE date_and_time =...
15
by: Simon Brooke | last post by:
I'm investigating a bug a customer has reported in our database abstraction layer, and it's making me very unhappy. Brief summary: I have a database abstraction layer which is intended to...
1
by: Roger Leigh | last post by:
I'd like to use standard C++ to process dates, converting to and from std::string and std::tm representations. The dates are going to/from a database, as ISO-8601 or SQL date-formatted strings. ...
1
by: ED | last post by:
I currently have an ODBC query that hits an Oracle database. I want to bring back records for a given month based on a job completion date in the Oracle database. I would like to have the user...
0
by: Brian Conway | last post by:
I am having some validation and insertion problems. I am using a date picker that takes the selected date and puts it to ("dd-MMM-yyyy") format, as this was the only format that Oracle would...
14
by: peteh | last post by:
Hi All; We have many production jobs that "load from cursor" to a UDB/AIX 8.2 (with dpf) data warehouse from source tables residing Oracle 9i. Since Oracle dates are (roughly) equivalent to DB2...
7
by: Middletree | last post by:
I am trying to display dates in a spreadsheet, but the dates need to be in a format that will allow them to be sorted in Excel. The datatype in the SQL Server database is datetime. In this case, I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.