I am generating an XML file from Oracle, but facing one problem while inserting 'DateTime' of the sysdate.
Using below query to insert datatime as 'ShowDateTime', but only date is inserting into the file not the time.
,XMLFOREST(to_date(to_char(SYSDATE,'DD-MON-RRRR HH24:MI'),'DD-MON-RRRR HH24:MI') AS "ShowDateTime"))))
INTO l_xml_brk_cont2 -- xml type variable
The current is : nls_date_format='YYYY-MM-DD HH24:MIS'
It will be nice if any one can help to insert the time also along with date.
I forgot to mention one point that the XSD validation before generating the XML file. The 'ShowDateTime' value is validating with the XSD where it has mentioned as type="xs:dateTime", hence will not allow any character data. So i need to generate the XML file as dateTime format whic will display date along with time also.