Jump to content

- - - - -

Display 'time' from an Oracle date/time field?

2 replies to this topic

#1 Guest_dennis gaworecki_*

Guest_dennis gaworecki_*
  • Guests

Posted 22 August 2000 - 06:02 PM

I have an oracle table that has 'one' field holding date & 'time' in it.
I can use sql 'to_char' & dump both the date & the time from the one field.
Is it possible to display both date & time using a pro-iv command???

I know cdate displays date... but is there a proiv statement that retrieves the time?
Or, can anyone give me some instructions on how to set up a stored procedure to
do this? THANKS!

#2 Shaun Rudland

Shaun Rudland


  • Members
  • PipPipPipPip
  • 165 posts
  • Location:Queensland, Australia

Posted 23 August 2000 - 12:48 AM

Create a PRO-IV file definition containing one alpha field
(ie DATE_RESULT) with sufficient length to able to return
your desired format for date and time
(ie DD-MON-YYYY HH:MM:SS would need at least 20 characters).
This file definition does NOT need to map to a table. If
you wish to retrieve one row then the SQL can be placed in
before read otherwise place the file as the primary file in
an lu.

The SQL should then read something like:


In after read no error on the PRO-IV file this value can
then be substringed to retrieve the time portion (ie
PRO-IV free for 385 Days B)

#3 Guest_dennis gaworecki_*

Guest_dennis gaworecki_*
  • Guests

Posted 23 August 2000 - 09:20 PM

Thanks.. Ill give it a try!

Reply to this topic


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users