• Post Reply Bookmark Topic Watch Topic
  • New Topic

Passing sysdate as parameter to Oracle procedure  RSS feed

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a requirement where I need to call an Oracle procedure
from a shell script.
Let us say that the procedure is procA( myDate IN DATE);

I need to pass system date to it from the shell script.
I can use "date" command in shell to get the date and if necessary
to format it using something like `date "+%d-%h-%y %H:%M:%S"`.

I am getting an error
ORA-01830: date format picture ends before converting entire input string

How can I pass sysdate to the procedure without getting this error ?

Any help/suggestions is appreciated.

Thanks

Sri
 
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my ora-database is currently turned off - maybe it's expecting some extra values as timezone or milliseconds?
Or "" around the time?

Can't you use oracle-time 'SELECT sysdate FROM dual;'?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!