Datetime formatting

Hello forum!  I REALLY need some help formatting a DATE field correctly.
I am working with the newest Data Services release, which I believe is 4.0.  The server is Windows 2008 R2 and my client is running Windows 7 Pro.  My source database is Oracle, and the data type is TIMESTAMP(6).  The target DB is SAP Hana with a data type of TIMESTAMP.
The actual data in the column I am working with contains dates in the form "02-APR-10 02.39.26.863348000 AM" and "30-JUN-10 01.52.58.424077000 PM" -  verified by viewing the data in Textpad.  Perhaps I am making this more complicated than need be but I have yet to figure out what format "mask" to specify in File Format Editor to correctly handle this data.  The "AM" and "PM" values are throwing me off.
I appreciate any help determining the correct way to format this data so DS inserts TIMESTAMP values into Hana.  Thank you!!
~Ben

Digging a little deeper into this, I discovered that the data I am working with was spooled to a text file using Oracle SQL Developer.  Running the exact same query on the same DB, Schema, and Table resulted in the data being spooled as mm/dd/yyyy hh24:mi:ss.ff6 (04/15/2010 13:36:24.723272 for example).
So, it seems I can get around the trailing AM/PM for now, but am still having trouble getting this revised format into a TIMESTAMP field in Hana.  I appreciate any "best practices" regarding how to format this field for insertion to Hana.
Thanks!
~Ben

Similar Messages

  • How To Get Only Month or Only Year from datetime format of yyyy-mm-dd

    Hi SQL gurus,
    I have field has datetime format of yyyy-mm-dd (ie. 2014-11-28).  Could anyone please educate me on how to extract only month (ie. November but not 11) and only year (ie, 2014) from 2014-11-28.  I writing two report have title of Number of
    sick leaves on November  and Number of sick leaves in 2014.  I am planning to extact 11 from 2014-11-28 and display as November on report title and the same goes for 2014.  Unless you have better non complicated way.   Thank you
    very much in advance.  DingDong!!

    There are multiple ways
    Month name
    SELECT DATENAME(mm,@DateParam)
    SELECT FORMAT(@DateParam,'MMMM')
    Year
    SELECT FORMAT(@DateParam,'yyyy')
    SELECT DATEPART(yy,@DateParam)
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Migration Issues from Informix to Oracle (datetime format)

    Hello, i am performing a Migration from Informix to Oracle, drive by Migration Workbench, i have an error migrating data from datetime and date fields. I suppose its related by datetime and date format, cause the error tells "Incorrect day or month" when i am migrating data from informix. Targets Oracle database date format is DD/MM/YYYY and source`s Informix database date format like MM/DD/YYYY. Is there any way, in OMW, to specify the mask of datetime or date format to convert date strings from informix to oracle format? Or have i got migrate offline and modify control file to do that with sql*loader?
    How can i do that?
    Example, especify to_date('....', 'MM/DD/YYYY H24:MI:SS') format for migrating informix datetime fields to Oracle.

    The problem i have is, several tables witch contains date and datetime fields, at the same table in informix, by migrating drive by omwb to oracle, the date format i receive from informix at reading is DD/MM/YYYY and datetime format receiving is HH24:MI:SS. Migrating date and datetime types from informix to date, both types to date in oracle, i get an error while matching DD = HH24, MM = MI and YYYY = SS where nls_date_format is DD/MM/YYYY and, the same error matching HH24 = DD, MI = MM and SS = YYYY when nls_date_format is HH24:MI:SS.
    If i set nls_date_format as "DD/MM/YYYY HH24:MI:SS" i get the same error, cause reading data from informix results in data format "DD/MM/YYYY" for date fields and "HH24:MI:SS" for datetime fields.
    I have more than 200 tables in informix with this problem to migrate to oracle, i can solve by migrating offline, modifying datacontrol file to casting to_date format, but over 200 tables, 200 datacontrol files... is there any way for solving that by online migration in omwb?

  • Xsd datetime format

    Hi, I'm using a javascript popup calendar on a web page which can return a timestamp in either of 3 formats (i can choose whichever):
    dd-mm-yyyy hh:mm:ss
    mm/dd/yyyy hh:mm:ss
    yyyy-mm-dd hh:mm:ss
    I want to convert this form value into the xsd datetime format yyyy-MM-ddThh:mm:ss.
    How can I do this?
    I have been using the following code, but this just deals with today's date. I need to alter it so that it can deal with the value from the popup calendar:
    Calendar calendar = Calendar.getInstance();
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'hh:mm:ss");
    StringBuffer sb = new StringBuffer( sdf.format(calendar.getTime()) );

    There is no piece ion your code which would set any value.
    Check the API for Calendar, it has many useful methods.

  • Need help in datetime format.

    hi there,
    currently, i have problem in converting datetime format into this pattern (yyyy-MM-dd).
    I could able to convert it in JSTL which is
    <c:set var="dates"><fmt:formatDate value="${now}" type="DATE" pattern="yyyy-MM-dd"/></c:set>
    <sql:query var="countLeave"
         sql =" SELECT * FROM VCST_EMPLOYEE_LEAVE WHERE CAST(FLOOR(CAST(leave_from AS FLOAT))AS DATETIME) = ? ">
              <sql:param value="${dates}"/>
         </sql:query>
    From the JSTL code above i would like to convert in Java code. I have no idea on how to convert it especially not converting the datetime datatype from MSSQL into String format.
    Is there any way of doing it. Thank you.

    try this
    // Format the current time.
    java.text.SimpleDateFormat formatter
    = new java.text.SimpleDateFormat ("yyyy-MM-dd");
    java.util.Date currentTime_1 = new java.util.Date();
    String dateString = formatter.format(currentTime_1);

  • Number to a datetime format

    I am trying to convert a number and a date field to a date time field and I am having issues.
    COl1 COl2
    11/23/2005 90359
    12/31/2005 123456
    02/03/2006 234534
    I want my output as
    11/23/2005 9:03:59
    12/31/2005 12:34:56
    02/03/2006 23:45:34
    Please let me know...

    Or
    michaels>  with t as
         (select '11/23/2005' col1, '90359' col2 from dual union all
          select '12/31/2005', '123456' col2 from dual union all
          select '02/03/2006', '234534' col2 from dual)
    select to_char(to_date(col1 || lpad(col2,6,0),'MM/DD/RRRRHH24MISS'),'MM/DD/RRRR HH24:MI:SS') x
      from t
    X                 
    11/23/2005 09:03:59
    12/31/2005 12:34:56
    02/03/2006 23:45:34Leave away the final formating TO_CHAR() if you really want a true »datetime« format!
    Message was edited by:
    michaels

  • POI HSSFWorkbook using to read data of datetime format

    Hi
    I am trying to read the drata from excel sheet which contain data as in date format.
    The data is in the datetime format but I am unable to read this data in our jsp page.
    its shows the cell type is of integer type.
    able to read simple date in format yyyy/mm/dd but getting problem in yyyy/mm/dd hh mm format.
    guide me what to to.
    Thanks
    parveen kumar

    Hi
    I am trying to read the drata from excel sheet which contain data as in date format.
    The data is in the datetime format but I am unable to read this data in our jsp page.
    its shows the cell type is of integer type.
    able to read simple date in format yyyy/mm/dd but getting problem in yyyy/mm/dd hh mm format.
    guide me what to to.
    Thanks
    parveen kumar

  • Convert the date of string to datetime format 'MM/dd/yyyy' when the system date format is 'dd/MM/yyyy'.

    I need convert the date of string format 'MM/dd/yyyy' to datetime format 'MM/dd/yyyy' when the system date format is 'dd/MM/yyyy'.Since
    I need to search values based on date where my database datetime  is 'MM/dd/yyyy' format.

    In my opinion you should re-consider the assumption that the date picker returns a string. Maybe it is able to return a
    DateTime object directly instead of string. Then you will pass this value as a parameter of SQL query. This should work regardless of computer configuration.
    Otherwise, follow the previous string-based approaches.

  • Trouble with SQL datetime format

    I have written a VI to import a CSV file into a SQL data table but I
    cannot get it to work when using a table with "datetime" data
    format.  It will import into a new table with undefined data
    formats as "varchar" format but no luck when going into a table with the "datetime" data
    format.   I need the datetime format for date/time queries later.
    I have attached a zip file of my VI and the CSV file.  Is there a problem with my CSV format or I am I doing
    something else wrong here?
    Please help.
    Thanks,
    Greg
    Attachments:
    SQL issue.zip ‏54 KB

    Greg
    I have just tried to insert your data into a SQL Server (MSDE) database.
    I found that the INSERT data didn't work. The TRUE for Create Table didn't seem to do any thing. So I created a table using labview like this
    And this is its design.
    I then run the vi again and it starts to work with no issues. So it looks like the Create Table?=TRUE for the INSERT doesn't seem to work on SQL Server. It looks like you need to create the table first.
    Here is your data in the database
    Let me know what you think
    David
    Message Edited by David Crawford on 04-28-2006 11:17 AM
    Attachments:
    Your Data.jpg ‏32 KB
    Create Table.jpg ‏20 KB
    Table Design.jpg ‏15 KB

  • Datetime format - auto colon entering in the time

    In Oracle 6i, the user could enter the date and time without entering a colon, and the colon would automatically populate. In Oracle 10g, this no longer is the case.
    Example:
    datetime format: MM/DD/RR HH24:MI
    User enters: 11/01/07 1900
    In 6i, it would put in the colon. In 10g, it responds with an error. If I use format MM/DD/YY HH24:MI, it puts in a colon, but saves the data as 11/01/0007 19:00.
    Is there a workaround? I found a related document in Metalink (Customer Tar # (Mandatory for Customer Bugs):5711214.992 ), but the workaround did not work.

    A format mask of MM/DD/YY HH24:MI is supposed to give you a year of 0007. RR is the one that has some built-in smarts: >50 gives you 19YY and <=50 gives you 20YY. The recommended format mask is to use four Y's: MM/DD/YYYY HH24:MI You basically force the users to be specific.<BR>
    If there was one lesson we should have all learned from the millennium bug, it was that a year should always be expressed in full. Am I right?<br>
    Can you please try MM/DD/YYYY HH24:MI and tell us what happens?

  • Need profile option for determining DateTime format in Oracle Forms

    Hello All,
    I also have requirement where I need to read the date format in which Oracle Forms displays date values.
    As per updates to [this thread|https://forums.oracle.com/forums/thread.jspa?messageID=10285119] , I just need to read the profile option "ICX: Date format mask" ("ICX_DATE_FORMAT_MASK"), and reformat the date value to my required target format.
    This is good for the date type of fields. But what about the profile option that determines "datetime" formats in Oracle Forms ?
    Appreciate any help.
    Thanks
    Bhaskar

    Are you linking the host script to fndcpesr? E.g.:
    Host script defined with prog extension:
    XXSCRIPT.prog
    Move it to relevant dir:
    $XX_TOP/bin
    Create a soft link to fndcpesr
    ln -s $FND_TOP/bin/fndcpesr XXSCRIPT

  • DateTime format comparison in OSB

    Hi All,
    I have a requirement where I need to compare two time-stamps coming in dateTime format. Do we have any out of the box Xquery functions that would help in this case? If no, then what would be the best way to achieve this? We are using OSB 11g
    Any hints towards it would be appreciated.
    Thanks,
    Harsh
    Edited by: HK^ on Jun 15, 2012 3:22 AM

    Direct comparison does work. Put a xs:dateTime around your dates to be sure.
    For ex.
    xs:dateTime($var1) > xs:dateTime($var2)
    or
    xs:dateTime($body//*:DateA) > xs:dateTime($body/*:DateB)

  • Invalid datetime format with odbc connection (VBA, Excel)

    Hello!
    I try to use QueryTable to extract data from the oracle-db.
    Source:
    sConn = "ODBC;DSN=" + odbc_dns + ";"
    Set oQt = tabelle.QueryTables.Add(Connection:=sConn, Destination:=tabelle.Range("a5"), sql:=sSql)
    oQt.Refresh
    As result I get this error message:
    "[Oracle][ODBC] Invalid datetime format"
    Is there any setting I need to do?
    regards
    Pietro

    Select to_char(entrydate,'dd/mm/yyyy) from usertable;Forgot the closing ' after yyyy.

  • Incorrect Timestamp dateTime format: expected YYYY-MM-DDTHH:MM:SS.NNNNNNNNN

    When i insert the data XML data using BPEL Process getting the following exception for date-format
    detail>oracle.j2ee.ws.client.jaxws.JRFSOAPFaultException: Client received SOAP Fault from server : Exception Description: Incorrect Timestamp dateTime format: [2010-01-01] (expected [YYYY-MM-DDTHH:MM:SS.NNNNNNNNN])</detail>
    </part>
    I have used the following date format and tried all the cases same above error.
    xp20:format-dateTime(../../DocumentHeader/EffectiveDate,'[Y0001]-[M01]-[D01] [h]:[m01]:[s01]')
    xp20:format-dateTime(../../DocumentHeader/EffectiveDate,'[Y0001]-[M01]-[D01]')
    Any idea how to convert Date to date format given error?

    Hi,
    I'm guessing the problem is not with the format, but with the input date...
    What content is coming in your EffectiveDate tag?
    It should be something like this...
    <EffectiveDate>2012-08-06T12:11:01Z</EffectiveDate>
    If the date format is not in ISO 8601, the XPath function won't work...
    Cheers,
    Vlad

  • BCS Datetime format to date only format in external list

    Hi ,
    Version: SharePoint Online 365
    I am having Date Field in DB . While i am retrieving in BCS Its showing as Datetime Format.
    How can trim Time Value. I need to display in Date Format only .
    How can i change? Please give me suggestions!!!
    Regards
    Vidhya

    Hi Vidhya,
    Try to format the date in the BCS External content Type, Please go through following link for further reference:
    http://blogs.msdn.com/b/bcs/archive/2010/02/11/working-with-complex-data-types-in-business-connectivity-services.aspx
    http://msdn.microsoft.com/en-us/library/gg271157.aspx
    Please don't forget to 'mark answer/propose answer' or 'vote as helpful' as appropriate.

  • Datetime format error FIM 2010 R2

    Hi Experts,
    I am getting employee EndDate in a file wtih format yyyymmdd like 20140314.
    I am able to get the date in metaverse through 'HR File Inbound Rule' but error while exporting to
    FIM MA.
    After getting the error 'datetime format' error, I made the following rule but again the same error.
    Left(EndDate,4)+"-"+Mid(EndDate,5,2)+"-"+Right(EndDate,2)+"00;00"=>employeeEndDate
    Again the same error :(
    Please suggest.
    Thanks,
    Mann

    Hi Mann,
    What you need to do is just flow Date onto FIM portal in correct format. I suppose the correct format would be which I also used to flow onto FIM Portal:
    Use "yyyy-MM-ddTHH:mm:ss.fff" .
    I hope this will help you. If yes, Please mark as answer.
    Thanks~ Giriraj Singh Bhamu

Maybe you are looking for

  • No goods receipt possible for purchase order 4000010123 00001

    Hi Experts, I created PO with 100 Qty then create GR with 20 Qty with mvt type '101' . then I am doing Return PO with 20 then I am creating GR with Reference to return PO with 161 movement type through BAPI 'BAPI_GOODSMVT_CREATE'.but it  giving error

  • Enabling Usage Rights with Adobe Pro 6.0

    Is there any way to enable usage rights in Adobe Acrobat Pro 6.0? Am i forced to buy a newer Adobe product in order to do this? Is there software online that allows me to do this? I would like to allow users to markup drawings in Acrobat Reader. Any

  • Automatic update in creating a photo album

    Hello, I have created several photo albums for product photos. I was wondering: if I need to add/delete photos do I need to create a new album with the edited folder or is there a way to automatically update? Thanks in advance for help.

  • AddPartialTarget doesn't refresh the region

    Hi, i have a region where a taskflow is consumed. After doing some update through the ui page , the values in main page remains but the values in the region disappears. when i press F5 the data in region comes in page. However through code when i do

  • How do i unmerge outlook

    how do i unmerge outlook? i restored after it was merged and the next closest backup was 2 months ago.  Can I unmerge those 2800 contacts in outlook?