Outputted date with unusual format mask

I am getting a flat file outputed from Fusion Financials SAAS, and one of the columns has this: 2013-11-14T15:10:36.000-06:00
Clearly its a date. I am guessing its a datetime TIMESTAMP WITH TIME ZONE datatype. But, the Format Model is unfamiliar to me, particularly regarding the letter 'T'.
Because its a flat file, this is coming to me as varchar2 data. I'd like to convert it to datetime.
I got to this:
select to_timestamp_tz('2013-11-14T15:10:36.000-06:00', 'YYYY-MM-DD HH24:MI:SS.FF TZH:TZM') AT LOCAL
from dual
It fails because of the letter 'T',
I know I could do this:
select to_timestamp_tz(REPLACE('2013-11-14T15:10:36.000-06:00','T',' '), 'YYYY-MM-DD HH24:MI:SS.FF TZH:TZM') AT LOCAL
from dual
And it works.
But that is not the point. The point is to find the Format Model that Oracle is using here.
Any thoughts on this?
Thanks,
Arie

Arie, the timezone format in the file is based on ISO 8601: ISO 8601 - Wikipedia, the free encyclopedia
This should work:
SQL> select to_timestamp_tz('2013-11-14T15:10:36.000-06:00', 'YYYY-MM-DD"T"HH24:MI:SS.FF TZH:TZM') from dual;
TO_TIMESTAMP_TZ('2013-11-14T15:10:36.000-06:00','YYYY-MM-DD"T"HH24:MI:SS.FF
14-NOV-13 03.10.36.000000000 PM +06:00
Hope this helps,
Oliver
Fusion Apps Developer Relations
https://blogs.oracle.com/fadevrel

Similar Messages

  • Apex mobile Date-Picker (date with time) format mask error

    Hi together.
    I'm playing  a little bit with Apex mobile.
    I want to save a date with hours and minutes in the database. So i have an date field (type: date with time).
    On my phone i can select an date value with time, but when i want to save the value, i get an format error, that the format 'YYYY-MM-DD"T"HH24:MI:SS' is wrong.
    I can't change the format mask in the element properties, because it is everytime going back to the old value "YYYY-MM-DD"T"HH24:MI:SS", when i save it.

    Not a 100% related, but personally and from a usability point-of-view I really dislike the built-in datetimepicker and so far every client who has seen it has agreed with it. It pops the date and time down to the bottom, it only selects when you hit close, it just doesn't look appealing as the normal datepicker does and you expect more. Personally I've also gone the route Jari described several times, and it's probably still the cleanest and least error-prone option. Validating dates can be quite a pain, but the datepicker built-in validation does that fine, so if you can circumvent validating a free-text time field that helps). I've used some jQuery timepicker plugins aswell, and they're ok, but still don't solve the validation (even though there is some javascript validation you still need serverside validation). All I'm trying to say is that using select lists for hour-minutes is not such a bad idea in my opinion.

  • Date Picker (Application Format Mask) YYYY-MM-DD HH24:MI

    I am experience what appears to be a bug with the Date Picker (Application Format Mask) that is causing the "DD" portion of the format mask to be interpreted as "CC" (when using a YYYY-MM-DD Application format).
    Within "Application Builder", "Edit Attributes" I have defined a "Static Substitution Strings" with the required Substitution String of PICK_DATE_FORMAT_MASK and a Substitution Value of "YYYY-MM-DD HH24:MI" (without the quotes).
    When this is used within the application, and I select a date of "January 15, 2008 @ 23:14", the date picker gives me a date of "2008-01-20 23:14". If I were to change the Year to 1957, the date I get is "1957-01-19 23:14". Note that if the century is 20, no matter what day of the month I pick, I get DD=20. If the century is 19, the day of the month is always 19.
    I have also tested this with a format of YYYY-DDD HH24:MI. With this format too, the DDD gets set to the century portion of the year.
    DD-MM-YYYY HH24:MI format does work, however this is not the format that my end users want to see. They want to see the format as "YYYY-MM-DD HH24:MI"
    If I change the PICK_DATE_FORMAT_MASK to "YY-MM-DD HH24:MI" and pick "Feb 8, 1977" I get "77-02-28" and if I pick "January 9, 1921" I get "21-01-31" which just happens to be the last day of the month in each of those case.
    So, something really weird is happen with the "Application Format Mask" Date Picker.
    Please note, that because of a known bug (relating to the translation of the Browser Language of "en-ca" to the propery NL_LANG of ENGLISH_CANADA) refer to
    HTMLDB - HOWTO Work with Dates
    I am executing the following code in my first "On Load - Before Header" and my first "On Submit - After Computations and Validations"
    EXECUTE IMMEDIATE 'ALTER SESSION SET NLS_DATE_FORMAT=''YYYY-MM-DD HH24:MI''' ;
    EXECUTE IMMEDIATE 'ALTER SESSION SET NLS_SORT=''FRENCH''' ;
    Could you please investigate this problem.

    Paul,
    Thank you for the feedback and detailed reporting of this issue.
    This is a previously identified bug with the computation of the day component of the popup calendar.
    This correction will be available with the next HTML DB patch set and/or the release of HTML DB available later this year.
    Thanks again.
    Joel

  • How to parse string to date with defualt format?

    is there any possibilities to parse a string to date if we don't specify the format in SDF?
    In database we have different formats and we need to convert each one convert to date with common format(something like default), is there any possibilities to do in java?

    jwenting wrote:
    Tolls wrote:
    ColinAtWork wrote:
    SumantK wrote:
    In database we have different formats and we need to convert each one convert to date with common format(something like default), is there any possibilities to do in java?Why don't you store the date in the database as a DATE datatype then you can format anyway you like??Because some people seem to fear DATEs and prefer the supposed comforts of a VARCHAR2...after all, who knows what murky goings on occur with a DATE, but at least a VARCHAR2 is readable, or something like that anyway.Just because some people don't know how to work with DATE fields (which is the real reason for their "fear" doesn't mean you shouldn't use them.
    They're the appopriate solution, so use it.Often but not always true.
    For example neither MS SQL Server nor Oracle timestamp types will store the resolution capable with the Java Date type. So if one wants to maintain all of that resolution one requires either a varchar or two columns.
    And although I haven't been able to confirm it (recently at least) at one time one of the Oracle drivers had a bug that a timestamp would wipe out following columns. For that one either one was left with having only a single timestamp as the last column or using a varchar.

  • Issue with Saving the Query output data in Excel format

    Hi,
    Recnetly we had upgraded from 4.6c to ECC 6.0.
    In ECc 6.0 environment, when user try to export the query output , we are getting only XML option to save the data.
    But user want to save the data in EXcel format, he was able to do that in 4.6C.
    pleas eprovide some inputs, on this issue.
    Thanks,
    Sanketh.

    I cannot for the life of me imagine, why a link to a post in the 'Business One Forum' where one uses ODBC to transfer query-data to MicroSoft Excel is of relevance to the OPs question, even if the same is not a security issue.
    Never mind. [note 40155|https://service.sap.com/sap/support/notes/402155] deals with various symptoms in the ALV-Excel combination as as of release 4.6C. There are various others, mostly in components BC-SRV-ALV and BC-ABA-LI - also: I remember that when we upgraded from 4.5B to 4.7C there was an issue with Excel-templates -> the solution was in the release notes somewhere. So, in addition to SMP you might want to check the release notes and/or upgrade guide for solutions.
    And yes, moderators ... this is not a security issue, this should go to ECC-Applications/Upgrade.

  • Applying date and number format mask

    I have specified a date format for an attribute and a number format for another attribute of an entity object using Entity Object Editor - Control hints for the attributes.
    The date format is:
    Format type: Simple Date
    Format: dd.MM.yyyy
    The number format is:
    Format type: Currency
    Format: 0,000.00 km
    When using <c:out value="${bindings.MyDate}"></c:out> the format mask for the date is applied and it looks good, but when using
    <c:forEach var="Row" items="...">
    <c:out value="${Row.MyDate}"></c:out>
    </c:forEach>
    the format mask is not applied.
    When it comes to the number format it is not applied no matter what I use.
    I have tried setting the format for the view object attributes as well but the result is the same. How do I make this work?

    Can it have something to do with <html:form> ? Since it works using <c:out value="${bindings.MyDate}"></c:out> inside a html:form.

  • Alpha channel data with layered format plugin

    I have a layered format plugin and I am trying to write the alpha channel information separately. I have set up channelPortProcs and I am attempting to read the pixel data with readPixelsProc. The issue is that even though the readPixelsProc function doesn't return any errors the rectangle that is supposed to store the rectangle that was actually read is a 0x0 rectangle. I can't seem to find why this would be or what I might be doing wrong. Here's what I have so far:
    // set up the pixel buffer
    int32 bufferSize = imSize.h*imSize.v;
    Ptr pixelData = sPSBuffer->New( &bufferSize, bufferSize );
    if (pixelData == NULL)
         *gResult = memFullErr;
         return;
    // Define the source and destination rectangles
    ReadChannelDesc *alphaChannel = gFormatRecord->documentInfo->alphaChannels;
    PIChannelPort port = alphaChannel->port;
    PSScaling scale;
    scale.sourceRect = scale.destinationRect = alphaChannel->bounds;
    VRect destRect = scale.sourceRect;
    // Set up the descriptor for reading pixel data
    VRect wroteRect = {0};
    PixelMemoryDesc dest = {0};
    dest.rowBits = imSize.h*alphaChannel->depth;
    dest.colBits = alphaChannel->depth;
    dest.depth = alphaChannel->depth;
    dest.data = pixelData;
    // Put the pixel data into the buffer
    *gResult = gFormatRecord->channelPortProcs->readPixelsProc(port,&scale, &destRect, &dest, &wroteRect);
    if(*gResult != noErr)
         return;
    The alpha channel gives me the proper name, but I just can't get the data associated with it. Thanks.

    I am still trying to find a solution to this.  The propChannelName is read only and the documentInfo structure is NULL when reading.  Any suggestions?

  • Output Date with the our

    I want to add Date with time in my code. how can I do that
    Thanks

    Hi,
    The code snippet for getting the current time and displaying in Format: yyyy-MM-dd HH:mm:ss
    import java.util.Calendar;
    import java.text.SimpleDateFormat;
    public class DateUtils {
    public static final String DATE_FORMAT_NOW = "yyyy-MM-dd HH:mm:ss";
    public static String now() {
    Calendar cal = Calendar.getInstance();
    SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_NOW);
    return sdf.format(cal.getTime());
    public static void main(String arg[]) {
    System.out.println("Now : " + DateUtils.now());
    Hope this helps you!
    Regards,Srilatha M

  • Group output data with cftable

    I can group data with breaks between each group with the
    following syntax:
    <!-------------------------------------------------------------------------------------->
    <cfoutput query="GetResults" group="site" >
    <table border="0" cellspacing="0" cellpadding="0" >
    <tr>
    <td>
    <ul>
    <cfoutput>
    <table>
    <tr align="left">
    <td>#tag#</td>
    <td>#serialnumber#</td>
    <td>#site#</td>
    <td>#department#</td>
    </tr>
    </table>
    </cfoutput>
    </UL>
    </td>
    </tr>
    </table>
    </cfoutput>
    <!------------------------------------------------------------------->
    However, can I also do it with the cftable tag, how would I
    need to change the following to make it display in groups with
    breaks inbetween the groups:
    <!---------------------------------------------------------------------------------------- ------
    <cftable query="GetResults" colspacing="0" colheaders>
    <cfcol header="tag" text="#tag#">
    <cfcol header="SN" text="#serialnumber#">
    <cfcol header="Site" text="#site#">
    <cfcol header="Program" text="#department#">
    <cfcol header="Type" text="#type#">
    <cfcol header="Brand" text="#brand#">
    <cfcol header="Model" text="#model#">
    <cfcol header="Date" text="#DateFormat(purchasedate,
    'mm/dd/yyyy')#">
    </cftable>
    <!---------------------------------------------------------------------->
    Thanks
    Manuel

    *CHECK THIS CODE, USES VERY LITTLE INTERNAL TABLE SPACE
    REPORT ZTEST3.
    tables mara.
    data:
    begin of IT_mseg OCCURS 0,
    matnr like mara-matnr,
    mblnr like mseg-mblnr,
    end of IT_mseg,
    W_MATNR LIKE MARA-MATNR.
    select-options:
    s_matnr for mara-matnr.
    select matnr into W_MATNR
    from mara
    where
    matnr in s_matnr.
    select max( mblnr ) from mseg
    into IT_MSEG-MBLNR
    where
    matnr eq W_MATNR.
    IF SY-SUBRC EQ 0.
    IT_MSEG-MATNR = W_MATNR.
    APPEND IT_MSEG.
    CLEAR IT_MSEG.
    ENDIF.
    ENDSELECT.
    LOOP AT IT_MSEG.
    WRITE:/ IT_MSEG-MATNR, IT_MSEG-MBLNR.
    ENDLOOP.

  • How to display time duration (NOT dates) with an input mask in a JTable?

    Background: I am trying to display in a JTable, in two columns, the start position and time duration of an audio clip.
    They are stored as type float internally eg. startPosition = 72.7 seconds.
    However I wish to display on screen in the table in HH:mm:ss:S format. eg. 00:01:12:7. The user can edit the cell and input values to update the internal member fields.
    Problem: I am finding it very difficult to implement this - what with the interactions of MaskFormatter, DefaultCellEditor etc.
    Also using SimpleDateFormat and DateFormatter does not work as they insist on displaying the day, month, year also in the table cell.
    Taking the Swing Tutorial TableFTFEditDemo example as a template,
    (http://java.sun.com/docs/books/tutorial/uiswing/components/example-1dot4/index.html#TableFTFEditDemo)
    does anyone know how to do this?
    I can post my (buggy) modifications to the example code - if it would help.
    Appreciate any help.
    thanks,
    Anil

    Here are my modifications to the TableFTFEditDemo example. If you run it, you get an exception
    like java.lang.NumberFormatException: For input string: "18:00:03.500"
    The two modified classes are taken from the Tutorial and are listed below:
    =================
    * IntegerEditor is a 1.4 class used by TableFTFEditDemo.java.
    import javax.swing.AbstractAction;
    import javax.swing.BorderFactory;
    import javax.swing.DefaultCellEditor;
    import javax.swing.JFormattedTextField;
    import javax.swing.JOptionPane;
    import javax.swing.JTable;
    import javax.swing.JTextField;
    import javax.swing.KeyStroke;
    import javax.swing.SwingUtilities;
    import java.awt.event.ActionEvent;
    import java.awt.event.KeyEvent;
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Toolkit;
    import java.text.DateFormat;
    import java.text.NumberFormat;
    import java.text.ParseException;
    import java.text.SimpleDateFormat;
    import java.util.Calendar;
    import java.util.Date;
    import javax.swing.text.DateFormatter;
    import javax.swing.text.DefaultFormatterFactory;
    import javax.swing.text.MaskFormatter;
    import javax.swing.text.NumberFormatter;
    class TimeRenderer {
         float seconds;
         TimeRenderer(String str) {
              int hSec = Integer.parseInt(str.substring(0,2)) * 60 * 60;
              int mSec = Integer.parseInt(str.substring(2,4)) * 60;
              int sSec = Integer.parseInt(str.substring(4,6));
              float tSec = Integer.parseInt(str.substring(6,7))/10.0F;
              seconds = hSec + mSec + sSec + tSec;
    * Implements a cell editor that uses a formatted text field to edit Integer
    * values.
    public class IntegerEditor extends DefaultCellEditor {
         JFormattedTextField ftf;
         static Date zeroTime = new Date(0L);
         private boolean DEBUG = true;
         SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss.S");
         MaskFormatter maskFo = new MaskFormatter("##:##:##.#");
         protected MaskFormatter createFormatter(String s) {
              MaskFormatter formatter = null;
              try {
                   formatter = new MaskFormatter(s);
              } catch (java.text.ParseException exc) {
                   System.err.println("formatter is bad: " + exc.getMessage());
                   System.exit(-1);
              return formatter;
         public IntegerEditor(int min, int max) throws ParseException {
              super(new JFormattedTextField(new MaskFormatter("##:##:##.#")));
              ftf = (JFormattedTextField) getComponent();
              // Set up the editor for the cells.
              ftf.setFormatterFactory(new DefaultFormatterFactory(new DateFormatter(sdf)));
              ftf.setFocusLostBehavior(JFormattedTextField.PERSIST);
              // React when the user presses Enter while the editor is
              // active. (Tab is handled as specified by
              // JFormattedTextField's focusLostBehavior property.)
              ftf.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "check");
              ftf.getActionMap().put("check", new AbstractAction() {
                   public void actionPerformed(ActionEvent e) {
                        if (!ftf.isEditValid()) { // The text is invalid.
                             ftf.setBorder(BorderFactory.createLineBorder(Color.RED));
                             ftf.setBackground(Color.PINK);
                             ftf.postActionEvent(); // inform the editor
                        } else
                             try { // The text is valid,
                                  ftf.commitEdit(); // so use it.
                                  ftf.postActionEvent(); // stop editing
                             } catch (java.text.ParseException exc) {
         // Override to invoke setValue on the formatted text field.
         public Component getTableCellEditorComponent(JTable table, Object value,
                   boolean isSelected, int row, int column) {
              JFormattedTextField ftf = (JFormattedTextField) super
                        .getTableCellEditorComponent(table, value, isSelected, row, column);
              System.out.println("value:" + value);
    //          long milliseconds =(long) (Float.parseFloat(value.toString()) * 1000);
              long milliseconds =(long) (((Float) value).floatValue() * 1000);
              Date dt = new Date(milliseconds);
              ftf.setValue(dt);
              return ftf;
         // Override to ensure that the value remains an Integer.
         public Object getCellEditorValue() {
              JFormattedTextField ftf = (JFormattedTextField) getComponent();
              Object o = ftf.getValue();
              try {               
                   Calendar cal = Calendar.getInstance();
                   cal.setTime((Date)o);
                   float seconds = cal.getTimeInMillis()/1000.0F;
                   return sdf.format(o);
                   //return new Float(seconds);
              } catch (Exception exc) {
                   System.err.println("getCellEditorValue: can't parse o: " + o);
                   exc.printStackTrace();
                   return null;
         // Override to check whether the edit is valid,
         // setting the value if it is and complaining if
         // it isn't. If it's OK for the editor to go
         // away, we need to invoke the superclass's version
         // of this method so that everything gets cleaned up.
         public boolean stopCellEditing() {
              JFormattedTextField ftf = (JFormattedTextField) getComponent();
              if (ftf.isEditValid()) {
                   try {
                        ftf.commitEdit();
                   } catch (java.text.ParseException exc) {
              } else { // text is invalid
                   ftf.setBorder(BorderFactory.createLineBorder(Color.RED));
                   ftf.setBackground(Color.PINK);
                   return false; // don't let the editor go away
              return super.stopCellEditing();
    //=====================================================
    * TableFTFEditDemo.java is a 1.4 application that requires one other file:
    *   IntegerEditor.java
    import javax.swing.JFrame;
    import javax.swing.JDialog;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.table.AbstractTableModel;
    import java.awt.Dimension;
    import java.awt.GridLayout;
    import java.text.ParseException;
    * This is exactly like TableDemo, except that it uses a
    * custom cell editor to validate integer input.
    public class TableFTFEditDemo extends JPanel {
        private boolean DEBUG = false;
        public TableFTFEditDemo() throws ParseException {
            super(new GridLayout(1,0));
            JTable table = new JTable(new MyTableModel());
            table.setPreferredScrollableViewportSize(new Dimension(500, 70));
            //Create the scroll pane and add the table to it.
            JScrollPane scrollPane = new JScrollPane(table);
            //Set up stricter input validation for the integer column.
         //   table.setDefaultEditor(Float.class,
           //                        new IntegerEditor(0, 100));
         //If we didn't want this editor to be used for other
         //Integer columns, we'd do this:
         table.getColumnModel().getColumn(3).setCellEditor(
              new IntegerEditor(0, 100));
            //Add the scroll pane to this panel.
            add(scrollPane);
        class MyTableModel extends AbstractTableModel {
            private String[] columnNames = {"First Name",
                                            "Last Name",
                                            "Sport",
                                            "# of Years",
                                            "Vegetarian"};
            private Object[][] data = {
                {"Mary", "Campione",
                 "Snowboarding", new Float(5.7), new Boolean(false)},
                {"Alison", "Huml",
                 "Rowing", new Float(3.5), new Boolean(true)},
                {"Kathy", "Walrath",
                 "Knitting", new Float(2.9), new Boolean(false)},
                {"Sharon", "Zakhour",
                 "Speed reading", new Float(20.8), new Boolean(true)},
                {"Philip", "Milne",
                 "Pool", new Float(10.5), new Boolean(false)}
            public int getColumnCount() {
                return columnNames.length;
            public int getRowCount() {
                return data.length;
            public String getColumnName(int col) {
                return columnNames[col];
            public Object getValueAt(int row, int col) {
                return data[row][col];
             * JTable uses this method to determine the default renderer/
             * editor for each cell.  If we didn't implement this method,
             * then the last column would contain text ("true"/"false"),
             * rather than a check box.
            public Class getColumnClass(int c) {
                 Object obj = getValueAt(0, c);
                 System.out.println("getColumnClass.obj:" + obj);
                return obj.getClass();
            public boolean isCellEditable(int row, int col) {
                //Note that the data/cell address is constant,
                //no matter where the cell appears onscreen.
                if (col < 2) {
                    return false;
                } else {
                    return true;
            public void setValueAt(Object value, int row, int col) {
                if (DEBUG) {
                    System.out.println("Setting value at " + row + "," + col
                                       + " to " + value
                                       + " (an instance of "
                                       + value.getClass() + ")");
                data[row][col] = value;
                fireTableCellUpdated(row, col);
                if (DEBUG) {
                    System.out.println("New value of data:");
                    printDebugData();
            private void printDebugData() {
                int numRows = getRowCount();
                int numCols = getColumnCount();
                for (int i=0; i < numRows; i++) {
                    System.out.print("    row " + i + ":");
                    for (int j=0; j < numCols; j++) {
                        System.out.print("  " + data[i][j]);
                    System.out.println();
                System.out.println("--------------------------");
         * Create the GUI and show it.  For thread safety,
         * this method should be invoked from the
         * event-dispatching thread.
         * @throws ParseException
        private static void createAndShowGUI() throws ParseException {
            //Make sure we have nice window decorations.
            JFrame.setDefaultLookAndFeelDecorated(true);
            //Create and set up the window.
            JFrame frame = new JFrame("TableFTFEditDemo");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            //Create and set up the content pane.
            TableFTFEditDemo newContentPane = new TableFTFEditDemo();
            newContentPane.setOpaque(true); //content panes must be opaque
            frame.setContentPane(newContentPane);
            //Display the window.
            frame.pack();
            frame.setVisible(true);
        public static void main(String[] args) {
            //Schedule a job for the event-dispatching thread:
            //creating and showing this application's GUI.
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    try {
                             createAndShowGUI();
                        } catch (ParseException e) {
                             // TODO Auto-generated catch block
                             e.printStackTrace();
    }

  • Select of date with yyyymmdd format

    HI I have a report that I want to select the current date -1.
    but our dates are in this format
    YYYYMMDD so I cant just use 'current date?

    What database are you reporting against?
    If you're using Oracle, you should consider creating a SQL Expression field with this code:
    TO_CHAR("DATE_FIELD", 'yyyymmdd')
    You can then use this field in the Record Selection formula to make sure the query generated contains a where clause. The record selection would be:
    totext(currentdate-1, "yyyyMMdd") = {%SQL_Expression_Formula}
    If you're using SQL Server, the SQL Expression formula would be:
    replace(convert(varchar, "DATE_FIELD", 111), '/','')
    -Abhilash

  • Loading Excel data with custom format applied

    Hi,
    I have an Excel File as source with the custom formatting applied to the data in it.
    For Eg. value 64 has special formatting applied so as to display it as 0064.
    BODS loads only the actual data as 64 and though I expect to load the formatted data(0064).
    Is this an expected behavior of BODS?
    DS Version : 14.1.2
    Thanks.

    No. If you define file format as flat file and define the field type as char then you can load all the formatted data like 0064 into DB. If you use excel then excel will remove leading zeros. This is excel functionality. or you can define the input file as CSV file and change the format of the field.
    Thanks,

  • Error While Formatting the Date with Timestamp  Format in MS WORD Template

    Hey
    I have a requirement where i need to change the date from " 2009-08-11T20:51:47.000-05:00 " to 08-AUG-2009:8:51:47 PM
    For this i SQL wrote
    CAST(DAYOFMONTH("- Protocol Product"."Date Created") AS VARCHAR(2)) || '-' || CAST(MONTHNAME("- Protocol Product"."Date Created") AS CHAR(3)) || '-' || CAST(YEAR("- Protocol Product"."Date Created") AS CHAR(4))DATE,
    "- Protocol Product"."Date Created" to get the first part i.e "08-AUG-2009" and for the second part i was just changing the date in MS Word h:mm am/pm and its not showing the correct time its showing 11-Aug-2009 1:51 AM insteas of 8:51 PM
    Is there any way to get the Format i need by using the SQL
    Any Help Appreciated
    ~Srix

    I used the following XSL and its Working !
    <?xdoxslt:xdo_format_date($_XDOXSLTCTX, "YOUR COLUMN",'DD-MMM-YYYY HH12:MI:SS AM')?>

  • TO_DATE with YYYY format mask behavior

    I was selecting records from a table where a date in the table is prior to a given year:
    SELECT * FROM the_table WHERE date_col <TO_DATE('2006','YYYY');
    On January 31st, this worked fine.
    On February 1st, I started seeing records from January 2006.
    When I run the following in SQL*Plus, the result is 2/1/2006:
    SELECT TO_DATE('2006','YYYY') FROM DUAL;
    I have used this format before (but perhaps not in the exact situation) and I've never seen this issue before.
    SQL*Plus is version 8.0.6.0.0. The result occurs on database versions 10.2.0.3.0 and 10.2.0.4.0.
    I'm not understanding why the current date would have any effect on the SELECTed date.
    Any insights would be appreciated.
    Thanks!

    Hi,
    When you don't spedcify the month in TO_DATE, it defaults to the current month.
    SELECT  SYSDATE
    ,       TO_DATE ('2006', 'YYYY')
    FROM    dual;just produced
    02-Feb-2009 01-Feb-2006You have to give the month:
    TO_DATE ('200601', 'YYYYMM')Edited by: Frank Kulash on Feb 2, 2009 3:21 PM
    Or use TRUNC (..., 'YYYY'), as Walter showed you.

  • Creating date with yyyyMMDDHHmmss format??

    How can i produce date so the result is in the format of "yyyyMMDDHHmmss"??
    For example 20060729180902. What is the sourcecode?

    What do u mean by SimpleDateFormat??
    Can u explain more?Im new in java....Open the API. Search for class SimpleDateFormat. Read the description and the methods.
    No point in me repeating what it says.

Maybe you are looking for

  • Messeging system in process chain!

    Hi, can any one here tell me in which of the process blocks one needs to include the Messege ( notifying via email if data upload is failed )! For transactional data, i had put it in the delete index process ( before uploading transactional infopacka

  • I want to add automatic ie tab in firefox without adding manual setting,also i want to change value of extensions.ietab.filterlist without going on about:config

    1)I wants to change default extensions.ietab.filterlist value to mywebsite url without going to follow many steps,whenever user will hit my site then for users browser extensions.ietab.filterlist value should be added when he will hit my site.About:c

  • Open Media Browser in IPhoto 08?

    How do I open the media browser in IPhoto 08? I do not see a menu option. I want to add a movie I shared from IMovie to the Media Browser, into one of my iPhoto galleries.... I was able to open it in garageband and drag it from there into IPhoto, but

  • Question in the PIM API

    I am working with the MIDP PIM API (javax.microedition.pim.*) so in the contacts part, could i define new fields other than the existing standard fields as the Name and Address in an item? I read in the PIM specification that there are extended field

  • JNI performance question

    I just wrote a C++ dll that mimicks the function of buffered reader. However, it is 3 times slower to perform the i/o operations using JNI than using Java's classes. Also, using the exact same code, the c++ is almost 2 times faster writing and almost