|
Oracle's default date format is 'DD-MON-YY'. If you do not change Oracle's default date format, then you will retrieve only the date portion and not the time, when selecting a DATE field from Oracle. Some DB query tools, such as TOAD, will format the date to show the time portion and display a different date format(configurable). If you run the same query in the Oracle SQL*PLus command line, you will see only the date and not the time. (Note when selecting a date in XAware, it is converted to the XAware format 'YYYY-MM-DD'.)
The way to get the time portion of an Oracle date is to use the TO_CHAR() Oracle function. You can edit your SQL query in XAware to add the TO_CHAR function to get the time portion, and format the result as desired. So if your query after building the BizComp looks something like:
<xa:request>SELECT DEMO.AGENT.STARTDATE, DEMO.AGENT.ID ...>
you can edit xa:request (or edit the query in the wizard) and change the query to something like the following (note the 'AS' clause to give you the same field name to reference in the mapping):
<xa:request>SELECT TO_CHAR(DEMO.AGENT.STARTDATE,'YYYY/MM/DD HH24:MI:SS') AS STARTDATE, DEMO.AGENT.ID ...>
Your result should now look something like:
<STARTDATE>1990/12/06 09:14:28</STARTDATE>
The date and time are displayed and the display format is set as specified (rather than the XAware default date format, which you could have also specified.)
Similarly, when you insert a date into Oracle and want to specify the time portion, you can use the TO_DATE() function. There are many web sites and articles that discuss date/time formats in Oracle, and show examples of Oracle functions.
|