Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old February 26th, 2004, 07:41 PM
jp1234 jp1234 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 26 jp1234 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
inserting dates

I have a form that users fill out online and then submit to my oracle database. One of the fields is the date when the form is submitted. I have it declared as a "date" data type, is that what I should be using or should I just use char? I am having a problem inserting the date because it says that it is in the wrong format. Suggestions?

Reply With Quote
  #2  
Old February 27th, 2004, 12:04 AM
mahdesh mahdesh is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 1 mahdesh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally Posted by jp1234
I have a form that users fill out online and then submit to my oracle database. One of the fields is the date when the form is submitted. I have it declared as a "date" data type, is that what I should be using or should I just use char? I am having a problem inserting the date because it says that it is in the wrong format. Suggestions?



Hi,
you need to convert date field what you are retrieving from
form to

TO_DATE(?,'DDMONYYYY')

before inserting into db.

Regards,
Mahesh

Reply With Quote
  #3  
Old February 27th, 2004, 08:40 AM
jp1234 jp1234 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 26 jp1234 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I was using to_date to convert it, but not to that format, I thought the default was YYYY-MM-DD?

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > inserting dates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway