Thread: inserting dates

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Posts
    26
    Rep 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?
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Posts
    2
    Rep Power
    0
    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
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Posts
    26
    Rep Power
    0
    I was using to_date to convert it, but not to that format, I thought the default was YYYY-MM-DD?

IMN logo majestic logo threadwatch logo seochat tools logo