Home » Developer & Programmer » JDeveloper, Java & XML » Date Formats in Dbms_Xmlquery.getXML
Date Formats in Dbms_Xmlquery.getXML [message #92592] Thu, 30 September 2004 07:44 Go to next message
kamal
Messages: 12
Registered: February 2002
Junior Member
Hi,

I have a problem in the Dbms_Xmlquery.getXML as it is getting data for the date fields as '9/25/2004 0:0:0'.

I want the field data to be displayed as '09/25/2004 00:00:00'.

Please, any if you have answers / solutions are appreciated.

Thanks! :)
Re: Date Formats in Dbms_Xmlquery.getXML [message #92596 is a reply to message #92592] Sun, 03 October 2004 13:11 Go to previous message
Magnar Johannessen
Messages: 12
Registered: February 2004
Junior Member
A solution is to use to_char on the date field:

example:

declare
i VARCHAR2(100);
begin
i := 'select to_char(sysdate,' || '''' || 'DD/MM/YYYY HH.MI.SS' || '''' || ') now from dual';
dbms_output.put_line( dbms_xmlquery.getxml(i));
end;

Regards
mj
Previous Topic: PLS-00306: wrong number or types of arguments in call to 'p_proc'
Next Topic: Problem with java function to run unix command
Goto Forum:
  


Current Time: Mon Nov 25 20:22:37 CST 2024