• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Passing sysdate as parameter to Oracle procedure

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Scala Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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;'?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic