var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Problem formatting date
This is the first time I am working with Oracle and I am really stuck with this problem. I have a date value that the user selects which is in the format mm/dd/yyyy hh:mi:ss AM/PM. This is a string, so i convert it to a date format & try to insert it in the database through my application.
I am trying to do this:
this gives an error :
to_date('06/01/2007 11:59:36 AM', 'mm/dd/yyyy hh12:mi:ss')
ORA-01830: date format picture ends before converting entire input string
When I removed "AM" from the user input string, it worked properly but with the AM/PM it gives error.
Is it possible to keep the AM/PM in the input string & make any change in the date format so that the above statement works & I don't have to remove AM/PM explicitly from the input string.
Any suggestion or help would really be appreciated.
You have to include the position of the AM in the format string:
See the description of format models
select to_date('06/01/2007 11:59:36 AM', 'mm/dd/yyyy hh12:mi:ss
Thanks for the reply.
It has hepled solve my problem
Last edited by sweetypie; 06-01-07 at