Setting Date Field Format After Query

How do I set the format of an Oracle date column after the query has run? The query does not include the TO_CHAR() function. Currently, I'm just using the MyQuery.FieldAsString() function to get the column.

I'd like to set the format to
'MM-DD-YYYY HH24:MI:SS'.

Thanks, and any ideas would be appreciated.
 
You can go into the registry and create a new string variable called NLS_DATE_FORMAT under the HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE/ORACLEHOME. Oracle home being your oracle home name on your workstation. Set the string to your date format and oracle will use that date format for all dates on that workstation only. If you want system wide then set the NLS_DATE_FORMAT on you server in the init script. I hope this is what you are looking for.
 
Back
Top