# Oracle Error- Ora-01830??????



## Prashanti (Apr 24, 2006)

ORA-01830
Hi !
Back with a problem ! 
I am using asp.net with Oracle as backend . When I try to insert a date into a particular field in the db I get this error :

*ORA-01830 date format picture ends before converting entire input string.*

I searched and found out that the oracle db is not accepting the full date format i.e , dd/MMM/yyyy hh:mm:ss 
where 
d=date of month
M=month
y=year
h=hour
m=min
s=sec

The db is only accepting dd/MMM/yyyy . How to make it accept 
dd/MMM/yyyy hh:mm:ss ????

Any help is very much appreciated.


----------



## Prashanti (Apr 24, 2006)

Problem was solved using TO_DATE function.

The insert string needed to be something like this :

insert into <tablename> values ( TO_DATE('DateTime.Today.Date','dd-MMM-yyyy hh:mm:ss'),field2,field3..)

where TO_DATE converts the date given by 'DateTime.Today.Date' to the specified format of 'dd-MMM-yyyy hh:mm:ss' .

Note :
Datetime is a Class in ASP.NET and not connected with ORACLE.


----------

