I’m getting a date (10-Nov-02) from Oracle. In IS 4.6, it is 2002-11-10 00:00:00.0 (i.e. with milliseconds). I don’t want the millisecond info. (without writing a java service to discard the millisecond info) Is there any parameter wherein I can set the Timestamp format for IS 4.6?
Thanks Dan… I’m currently using pub.date:dateTimeFormat built-in service. But, I need to use this service everytime I encounter a date field. Is there any way to avoid this transformation by setting a format at one place?
Try leaving the variables in the pipeline. Provided you do not overwrite them in your Flow, you will have currentPattern and newPattern available for mapping anytime.
Or, you could revise your SQL statement to select the DATE object in the proper format.
Try: SELECT TO_CHAR(COLUMNNAME,‘MM/DD/YY hh:MI:SS AM’) AS NEWCOLUMNNAME FROM TABLE
Use a profile to manage the pattern and/or other static data (harder, read current article in eZine).
Write your own “getMyDate” flow service. Very easy.
a. Create empty flow service.
b. Create map step. Instantiate a variable there and enter the pattern in the map.
c. Call the pub.date:dateTimeFormat.
Alternatively, you can set the variable, add another map flow and use a transformer.
Java format objects can have threading issues (they are inherently prone to re-entrance problems). Using string manipulation may be the better choice here.