BizTalk map Julian date

Hi,
how can i convert date into julian date in BT map. 
Thanks in adv.
2Venture2

Try this in BizTalk map via an inline C# scripting functoid
public static string ToJulian(string strdateTime)
DateTime dateTime = Convert.ToDateTime(strdateTime);
int day = dateTime.Day;
int month = dateTime.Month;
int year = dateTime.Year;
if (month < 3)
month = month + 12;
year = year - 1;
long dt = day + (153 * month - 457) / 5 + 365 * year + (year / 4) - (year / 100) + (year / 400) + 1721119;
return dt.ToSTring(dt);
or this returns long, and the input parameter is datetime
public static long ToJulian(DateTime dateTime)
int day = dateTime.Day;
int month = dateTime.Month;
int year = dateTime.Year;
if (month < 3)
month = month + 12;
year = year - 1;
return day + (153 * month - 457) / 5 + 365 * year + (year / 4) - (year / 100) + (year / 400) + 1721119;
Refer this article for more details:http://mikearnett.wordpress.com/2011/09/13/c-convert-julian-date/
Following in the what we have been using in our maps, this has two static methods. One for standard datetime to Julian and another to convert Short datetime to Julian:
public int ToJulian(string dt)
try
DateTime date = DateTime.Parse(dt);
return ((date.Year - 1900) * 1000) + date.DayOfYear;
catch
return 0;
/// <summary>
/// Convert to Julian from dd/mm/yy
/// </summary>
/// <param name="dt"></param>
/// <returns></returns>
public int ToJulianFromShortDT(string dt)
try
DateTime date = new DateTime(int.Parse(dt.Substring(6, 2))+2000, int.Parse(dt.Substring(3, 2)), int.Parse(dt.Substring(0, 2)));;
return ((date.Year - 1900) * 1000) + date.DayOfYear;
catch
return 0;
If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

Similar Messages

  • Problem with context mapping and data flow in a FPM application

    Hi All,
    I am trying to develop an ESS application using FPM. For the same, the requirement is to see the history of an employee in the second view.
    The first view has got just the overview information and the second one has got the detail. So, the records or the fields are the same on both the views.
    As per the FPM guidelines, the Model is residing in the Fc component and the respective Vc components are using the model data accordingly.
    I am executing the model in the Fc component calling the executable method in the interfaceController of the first view and then trying to display the output data of the BAPI in the first view which provides the overview information.This is working fine.
    But when i am trying to map the same output node to the Table UI for the second view, the record size is coming zero and thus no information is available.
    For the above issue, I am again executing the RFC in the InterfaceController of the second view to populate the records, which is incorrect as it is already executed and the data is available for the first view.
    I request you to let me know the correct approach to Context mapping and data flow when using FPM-roadmap. Is their any standard method or approach available to deal with such requirements? Please let me know.
    Thanks in advance.
    Regards
    DK

    Hi Idhaya,
    I model node is available in Fc and the Fc interface controller is being used in the first Vc and the second Vc.
    So the idea is, as the executable method is generated in the Fc, so i have created a custom method to call the executable method in Fc, where the input parameter is getting passed and this custom method is finally getting called is the first Vc.
    So , now my first Vc is ready to call the custom method in Fc and execute the RFC. Once the RFC is executed, the nodes in the Fc should get populated which is the ideal case.
    And as the Fc is used as a component in the second Vc, the same node is available to the UI elements.
    But, when I check the record size for the output node, it is always zero, for the second Vc.
    Regards
    DK

  • Problem in mapping xml data with header details from IPM 11g to BPEL

    Hi,
    I want to map xml data as a supporting content from IPM application to BPEL.
    My xml is
    <?xml version="1.0" encoding="utf-8"?>
    <DocumentFile xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://tempuri.org/Document.xsd">
    <Document DocumentType="Invoice">
    <DocumentImage>
    <Filename>\\10.205.0.209\Img\10883212.TIF</Filename>
    </DocumentImage>
    </DocumentFile>
    If I remove header details from root element <DocumentFile> i.e. modified xml is
    <DocumentFile>
    <Document DocumentType="Invoice">
    <DocumentImage>
    <Filename>\\10.205.0.209\Img\10883212.TIF</Filename>
    </DocumentImage>
    </DocumentFile>
    it works fine but i need to pass header details as well.
    Please suggest.
    Thanks,
    Priya

    Hi Naveen,
    In sxmb_moni the content transmitted to the adapter(RFC)is as follows
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns:ZRFID_EQUIP xmlns:ns="urn:sap-com:document:sap:rfc:functions">
    - <RECORDS>
    - <item>
      <FLOC>f1-01-01</FLOC>
      <RFID_NO>I006</RFID_NO>
      </item>
    - <item>
      <FLOC>f1-01-02</FLOC>
      <RFID_NO>I002</RFID_NO>
      </item>
    - <item>
      <FLOC>f1-01-03</FLOC>
      <RFID_NO>I003</RFID_NO>
      </item>
    - <item>
      <FLOC>f1-01-04</FLOC>
      <RFID_NO>I004</RFID_NO>
      </item>
    - <item>
      <FLOC>f1-01-05</FLOC>
      <RFID_NO>I005</RFID_NO>
      </item>
    - <item>
      <FLOC>f1-01-06</FLOC>
      <RFID_NO>I001</RFID_NO>
      </item>
      </RECORDS>
      </ns:ZRFID_EQUIP>
    At r/3 side the field floc and rfid_no gets mapped to floc which is of char30
    eg floc=f1-01-01I006
       rfid_no=

  • Context Mapping and data binding

    Hi,
    Please explain about the context mapping and data dinding
    and also differences
    Thank's & Regard's.
    Sri

    Hi Sridevi Sudunaguntla ,
    context mapping-> means mapping between different contexts
    ie suppose if we are creating a node in the component controllet and if we want to use that node in view a and view b, then  we have to map this node from component controller to the required view.. this mapping of context nodes is called context mapping..for context mapping, create nodes in compcontroller.. tehn go to view-> context-> tehn drag and drop required node from component controller to the view ..
    data binding-> means binding the data from nopde to the ui elements or viceversa... after the nodes are created in indudual views or after context mapping.. we have to bind these nodes to the ui elements... suppose we have an input field and we want to read that,, so we have to bind the input field to an attribute in the node.. this binding is called.. data binding.
    Regards
    Sarath

  • Error in Mapping of Data for Scrambling Rule due to Inconsistency detected in Mapping Engine PIFD

    Hi all,
    We are performing an HCM Data scrambling, however, in Package Setting phase, we are encountering error in mapping of data for scrambling rule, saying there are inconsistency detected in mapping Engine PIFD.
    We have already implemented and checked below SAP notes, but still no luck.
    1854557 - Missing PIFD objects or mappings after LT AddOn install.
    1665861
    - TDMS 4.0 - Collective note for Scrambling
    Please advise how to fix the issue? Project is at stand still due to this.
    OSS message already opened.
    Thanks and regards,
    Philip

    Hi
    This is bug 5195315, which looks to be fixed in a 10.2 patch. If you can pick up the latest 10.2 patch there is like 3 years of fixes worth picking up.
    Cheers
    David

  • Conversion from YYYYMMDD to Julian Date in BPEL

    Hi,
    My requirement is to convert date format from YYYYMMDD to Julian Date (CYYDDD) in BPEL.
    C - Stands for Century
    Would like to know a way to achieve this conversion in BPEL. Please suggest.
    Appreciate your quick help.
    Thanks
    Priyanka G

    Hi,
    I suggest you use a java activity for that... There are many examples in java on how to convert a date to julian...
    Cheers,
    Vlad

  • Convert string (in a Julian Date format) to a date in CR XI Release 2

    How do you convert a string field  entered in a database as a Julian date " 10109 , 09008. ,,," to
    print on a report as  date?
    09008 would be 01/08/09
    10109                 04/19/10

    A small correction to Brian's formula:
    NumberVar myYear;
    NumberVar myDays;
    myYear := ToNumber( {table.JULIAN} [1 to 2]);
    myDays := TONUMBER({table.JULIAN} [3 to 5]);
    (Date (myYear, 1, 1) + myDays) - 1;
    The result for '09008' will be 01/08/9, by adding ToText, you can get the result in the desired format of 01/08/09.
    totext((Date (myYear, 1, 1) + myDays) - 1, "MM/dd/yy");
    Here is an alternate solution without having to create variables:
    totext(dateserial(tonumber(X[1 to 2]),1,tonumber(X[3 to 5])),"MM/dd/yy");
    where X is the julian date in string.
    Edited by: Sanjay Kodidine on Apr 20, 2010 8:25 AM

  • How to Convert Normal XML date or Oracle date to JDE Julian Date

    We can do a simple mathematical step in XSLT :
    'xpath20:format-dateTime(xpath20:current-dateTime(),"[Y0001][d001]") - 1900000'
    Or in SQL :
    Select to_char(sysdate,'YYYYDDD')-1900000 from dual;
    Julian Date is: Year in 4 digits, YYYY, and Number of days in 3 digits, DDD
    JDE Julian Date is Julian Date -1900000 (ie it counts Julian date from 1900 Year)
    "[Y0001][d001]” returns date in Year in 4 digit + number of days in 3 digits. This is the Julian date.
    Subtracting 1900000 ( ie YR ’1900’ & DAY ‘000’) gives the required JDE Julian Date.
    Edited by: prakash.pankaj on Jul 8, 2011 2:13 PM
    Edited by: prakash.pankaj on Jul 8, 2011 4:02 PM
    Edited by: panks on Jul 20, 2011 3:43 PM

    Hi,
    getTime() (in Date) will give you that date in milliseconds since January 1, 1970 00:00:00 GMT.
    To my knowledege, this is the same as Unix date format.

  • Mapping util.Date to Oracle timestamp

    Tuesday, March 22, 2005
    I am currently experiencing difficulty in mapping a java.util.Date
    field to an Oracle TIMESTAMP column.
    Here's what I see. By default, Kodo maps the date field to a DATE
    column. I suppose this makes sense since Oracle's date columns
    have time information that resolves to the second. In this case,
    the client has a business case to store subsecond resolution,
    hence the desire to store the date field in an Oracle TIMESTAMP
    column.
    First question: how should this be done?
    Here's what I've tried. I tried setting the jdbc-type extension
    for the date field to "timestamp". This setting makes no
    difference, and I suspect the reason is that OracleDBDictionary
    has made the mapping from TIMESTAMP to DATE.
    I tried setting the jdbc-sql-type extension for the date field to
    "timestamp". This makes a difference only when I drop the table.
    Then the schematool's refresh action creates a table with date's
    field mapped to a TIMESTAMP column. I have also gone ahead and
    manually altered the table to achieve the same effect.
    Once the mapping is created, I see the following behavior. Kodo
    has no problem reading the TIMESTAMP column and putting the info
    into the date field. It also has no problem saving non-null date
    values into the TIMESTAMP column. But it does have a problem
    storing a null in the date field.
    Second question: what is the workaround to this problem?
    The the stack dump (obtained by using the JDO Tools Library
    example) follows.
    Thanks in advance,
    David Ezzio
    enter command:
    --> return book
    Select the book to return:
    1. book [com.ysoft.jdo.book.library.Book-354] "Gone to War" checked out:
    Tue Mar 22 10:38:01 EST 2005
    2. book [com.ysoft.jdo.book.library.Book-356] "Gone to Work" checked
    out: Tue Mar 22 10:33:58 EST 2005
    3. book [com.ysoft.jdo.book.library.Book-357] "Gone Fishing" checked
    out: Tue Mar 22 10:33:58 EST 2005
    4. book [com.ysoft.jdo.book.library.Book-360] "Gone Sailing" checked
    out: Tue Mar 22 10:33:58 EST 2005
    5. book [com.ysoft.jdo.book.library.Book-355] "Gone Hunting" checked
    out: Tue Mar 22 10:33:58 EST 2005
    Enter selection:
    --> 2
    okay
    enter command:
    --> commit
    exception caught in command
    kodo.util.FatalDataStoreException: The transaction has been rolled back.
    See the nested exceptions for details on the errors that occu
    rred.
    at
    kodo.runtime.PersistenceManagerImpl.throwFlushException(PersistenceManagerImpl.java:1262)
    at
    kodo.runtime.PersistenceManagerImpl.flush(PersistenceManagerImpl.java:1122)
    at
    kodo.runtime.PersistenceManagerImpl.flushSafe(PersistenceManagerImpl.java:1005)
    at
    kodo.runtime.PersistenceManagerImpl.beforeCompletion(PersistenceManagerImpl.java:932)
    at
    kodo.runtime.LocalManagedRuntime.commit(LocalManagedRuntime.java:69)
    at
    kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:592)
    at
    com.ysoft.jdo.book.library.LibraryHandler.commitTransaction(LibraryHandler.java:175)
    at
    com.ysoft.jdo.book.library.client.CommitTransaction.execute(Library.java:279)
    at
    com.ysoft.jdo.book.common.console.UserInterface.execute(UserInterface.java:196)
    at
    com.ysoft.jdo.book.common.console.UserInterface.pumpCommands(UserInterface.java:186)
    at com.ysoft.jdo.book.library.client.Library.run(Library.java:139)
    at com.ysoft.jdo.book.library.client.Library.main(Library.java:104)
    NestedThrowablesStackTrace:
    kodo.util.DataStoreException: Invalid column type
    at
    kodo.jdbc.sql.DBDictionary.newDataStoreException(DBDictionary.java:3081)
    at kodo.jdbc.sql.SQLExceptions.getDataStore(SQLExceptions.java:77)
    at kodo.jdbc.sql.SQLExceptions.getDataStore(SQLExceptions.java:63)
    at kodo.jdbc.sql.SQLExceptions.getDataStore(SQLExceptions.java:43)
    at
    kodo.jdbc.runtime.PreparedStatementManager.flush(PreparedStatementManager.java:89)
    at
    kodo.jdbc.runtime.UpdateManagerImpl.flush(UpdateManagerImpl.java:445)
    at
    kodo.jdbc.runtime.UpdateManagerImpl.flush(UpdateManagerImpl.java:193)
    at
    kodo.jdbc.runtime.UpdateManagerImpl.flush(UpdateManagerImpl.java:95)
    at
    kodo.jdbc.runtime.JDBCStoreManager.flush(JDBCStoreManager.java:609)
    at
    kodo.runtime.DelegatingStoreManager.flush(DelegatingStoreManager.java:153)
    at
    kodo.runtime.PersistenceManagerImpl.flush(PersistenceManagerImpl.java:1122)
    at
    kodo.runtime.PersistenceManagerImpl.flushSafe(PersistenceManagerImpl.java:1005)
    at
    kodo.runtime.PersistenceManagerImpl.beforeCompletion(PersistenceManagerImpl.java:932)
    at
    kodo.runtime.LocalManagedRuntime.commit(LocalManagedRuntime.java:69)
    at
    kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:592)
    at
    com.ysoft.jdo.book.library.LibraryHandler.commitTransaction(LibraryHandler.java:175)
    at
    com.ysoft.jdo.book.library.client.CommitTransaction.execute(Library.java:279)
    at
    com.ysoft.jdo.book.common.console.UserInterface.execute(UserInterface.java:196)
    at
    com.ysoft.jdo.book.common.console.UserInterface.pumpCommands(UserInterface.java:186)
    at com.ysoft.jdo.book.library.client.Library.run(Library.java:139)
    at com.ysoft.jdo.book.library.client.Library.main(Library.java:104)
    NestedThrowablesStackTrace:
    java.sql.SQLException: Invalid column type
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
    at
    oracle.jdbc.driver.OracleStatement.get_internal_type(OracleStatement.java:6164)
    at
    oracle.jdbc.driver.OraclePreparedStatement.setNull(OraclePreparedStatement.java:1316)
    at
    com.solarmetric.jdbc.DelegatingPreparedStatement.setNull(DelegatingPreparedStatement.java:369)
    at
    com.solarmetric.jdbc.PoolConnection$PoolPreparedStatement.setNull(PoolConnection.java:406)
    at
    com.solarmetric.jdbc.DelegatingPreparedStatement.setNull(DelegatingPreparedStatement.java:369)
    at
    com.solarmetric.jdbc.DelegatingPreparedStatement.setNull(DelegatingPreparedStatement.java:369)
    at
    com.solarmetric.jdbc.DelegatingPreparedStatement.setNull(DelegatingPreparedStatement.java:369)
    at
    com.solarmetric.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.setNull(LoggingConnectionDecorato
    r.java:792)
    at
    com.solarmetric.jdbc.DelegatingPreparedStatement.setNull(DelegatingPreparedStatement.java:369)
    at kodo.jdbc.sql.DBDictionary.setNull(DBDictionary.java:950)
    at
    kodo.jdbc.sql.OracleDictionary.setNull(OracleDictionary.java:450)
    at kodo.jdbc.sql.RowImpl.toSQL(RowImpl.java:828)
    at kodo.jdbc.sql.RowImpl.flush(RowImpl.java:1039)
    at kodo.jdbc.sql.RowImpl.flush(RowImpl.java:975)
    at
    kodo.jdbc.runtime.PreparedStatementManager.flushInternal(PreparedStatementManager.java:160)
    at
    kodo.jdbc.runtime.PreparedStatementManager.flush(PreparedStatementManager.java:84)
    at
    kodo.jdbc.runtime.UpdateManagerImpl.flush(UpdateManagerImpl.java:445)
    at
    kodo.jdbc.runtime.UpdateManagerImpl.flush(UpdateManagerImpl.java:193)
    at
    kodo.jdbc.runtime.UpdateManagerImpl.flush(UpdateManagerImpl.java:95)
    at
    kodo.jdbc.runtime.JDBCStoreManager.flush(JDBCStoreManager.java:609)
    at
    kodo.runtime.DelegatingStoreManager.flush(DelegatingStoreManager.java:153)
    at
    kodo.runtime.PersistenceManagerImpl.flush(PersistenceManagerImpl.java:1122)
    at
    kodo.runtime.PersistenceManagerImpl.flushSafe(PersistenceManagerImpl.java:1005)
    at
    kodo.runtime.PersistenceManagerImpl.beforeCompletion(PersistenceManagerImpl.java:932)
    at
    kodo.runtime.LocalManagedRuntime.commit(LocalManagedRuntime.java:69)
    at
    kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:592)
    at
    com.ysoft.jdo.book.library.LibraryHandler.commitTransaction(LibraryHandler.java:175)
    at
    com.ysoft.jdo.book.library.client.CommitTransaction.execute(Library.java:279)
    at
    com.ysoft.jdo.book.common.console.UserInterface.execute(UserInterface.java:196)
    at
    com.ysoft.jdo.book.common.console.UserInterface.pumpCommands(UserInterface.java:186)
    at com.ysoft.jdo.book.library.client.Library.run(Library.java:139)
    at com.ysoft.jdo.book.library.client.Library.main(Library.java:104)
    enter command:
    -->

    Hi Stephen,
    There are two related issues that are addressed. One, some Oracle
    drivers return the wrong type (Type.OTHER) for the TIMESTAMP field.
    This is true for the
    9.2.0.1.0 driver that ships with 9iR2. This causes an exception when
    attempting to assign a null to the date field that has been mapped to a
    TIMESTAMP column. Two, all of the 9i drivers (and 10g drivers) return a
    type name of "TIMESTAMP(x)" where x is the precision. This confuses
    Kodo's OracleDictionary which is looking for a string without the
    precision characters.
    Following your suggestion, the following code fixes it just fine. It is
    harmless, in that all it does is do what OracleDictionary intended but
    failed to do. To use it, you must add the following property
    configuration to the kodo.properties file.
    kodo.jdbc.DBDictionary: xxx.jdo.FixedOracleDictionary
    Without the fix, Kodo does not reassign the TIMESTAMP columns to a type
    of DATE. So far as I can tell, as long as the driver returns a
    Types.TIMESTAMP this does not cause a failure.
    This fix will be moot as soon as the bug in OracleDictionary is fixed.
    What I wonder about is why does Kodo reassign type TIMESTAMP to DATE?
    Why don't you treat TIMESTAMP types as TIMESTAMP types? Curious minds
    want to know.
    Best wishes,
    David
    ---- code follows
    package xxx.jdo;
    import java.sql.*;
    import kodo.jdbc.schema.*;
    import kodo.jdbc.sql.*;
    * Some Oracle drivers do not return the correct type for the TIMESTAMP
    field.
    * This class fixes this issue for Kodo 3.3. The problem (an exception
    complaining
    * about an invalid column type) appears when mapping a Java field
    (Date for example) to
    * an Oracle timestamp field, and only when attempting to set null on
    the Java field.
    public class FixedOracleDictionary
    extends OracleDictionary
    public Column[] getColumns (DatabaseMetaData meta, String catalog,
    String schemaName, String tableName,
    String columnName, Connection conn)
    throws SQLException
    // Let Kodo's OracleDictionary do its thing
    Column[] cols = super.getColumns (meta, catalog, schemaName,
    tableName,
    columnName, conn);
    // Catch the columns with a name of "TIMESTAMP(n)" and mark them
    as DATE types.
    // This is what the OracleDictionary intended to do, but was
    foiled by the
    // name which now has a precision.
    for (int i = 0; cols != null && i < cols.length; i++)
    String tName = cols.getTypeName();
    if (tName != null && tName.startsWith("TIMESTAMP"))
    cols[i].setType(Types.DATE);
    return cols;
    ---- code ends
    Stephen Kim wrote:
    This is a bug (1111)with regards to specific combinations of Oracle 10
    driver and db.
    To work around the issue until the next relase, getColumns (...) in
    OracleDictionary needs to be extended/modified to instead of doing a
    strict equals () comparison to "TIMESTAMP", to instead do a startsWith
    ("TIMESTAMP")
    David Ezzio wrote:
    Tuesday, March 22, 2005
    I am currently experiencing difficulty in mapping a java.util.Date
    field to an Oracle TIMESTAMP column.
    Here's what I see. By default, Kodo maps the date field to a DATE
    column. I suppose this makes sense since Oracle's date columns
    have time information that resolves to the second. In this case,
    the client has a business case to store subsecond resolution,
    hence the desire to store the date field in an Oracle TIMESTAMP
    column.
    First question: how should this be done?
    Here's what I've tried. I tried setting the jdbc-type extension
    for the date field to "timestamp". This setting makes no
    difference, and I suspect the reason is that OracleDBDictionary
    has made the mapping from TIMESTAMP to DATE.
    I tried setting the jdbc-sql-type extension for the date field to
    "timestamp". This makes a difference only when I drop the table.
    Then the schematool's refresh action creates a table with date's
    field mapped to a TIMESTAMP column. I have also gone ahead and
    manually altered the table to achieve the same effect.
    Once the mapping is created, I see the following behavior. Kodo
    has no problem reading the TIMESTAMP column and putting the info
    into the date field. It also has no problem saving non-null date
    values into the TIMESTAMP column. But it does have a problem
    storing a null in the date field.
    Second question: what is the workaround to this problem?
    The the stack dump (obtained by using the JDO Tools Library
    example) follows.
    Thanks in advance,
    David Ezzio
    enter command:
    --> return book
    Select the book to return:
    1. book [com.ysoft.jdo.book.library.Book-354] "Gone to War" checked
    out:
    Tue Mar 22 10:38:01 EST 2005
    2. book [com.ysoft.jdo.book.library.Book-356] "Gone to Work" checked
    out: Tue Mar 22 10:33:58 EST 2005
    3. book [com.ysoft.jdo.book.library.Book-357] "Gone Fishing" checked
    out: Tue Mar 22 10:33:58 EST 2005
    4. book [com.ysoft.jdo.book.library.Book-360] "Gone Sailing" checked
    out: Tue Mar 22 10:33:58 EST 2005
    5. book [com.ysoft.jdo.book.library.Book-355] "Gone Hunting" checked
    out: Tue Mar 22 10:33:58 EST 2005
    Enter selection:
    --> 2
    okay
    enter command:
    --> commit
    exception caught in command
    kodo.util.FatalDataStoreException: The transaction has been rolled
    back. See the nested exceptions for details on the errors that occu
    rred.
    at
    kodo.runtime.PersistenceManagerImpl.throwFlushException(PersistenceManagerImpl.java:1262)
    at
    kodo.runtime.PersistenceManagerImpl.flush(PersistenceManagerImpl.java:1122)
    at
    kodo.runtime.PersistenceManagerImpl.flushSafe(PersistenceManagerImpl.java:1005)
    at
    kodo.runtime.PersistenceManagerImpl.beforeCompletion(PersistenceManagerImpl.java:932)
    at
    kodo.runtime.LocalManagedRuntime.commit(LocalManagedRuntime.java:69)
    at
    kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:592)
    at
    com.ysoft.jdo.book.library.LibraryHandler.commitTransaction(LibraryHandler.java:175)
    at
    com.ysoft.jdo.book.library.client.CommitTransaction.execute(Library.java:279)
    at
    com.ysoft.jdo.book.common.console.UserInterface.execute(UserInterface.java:196)
    at
    com.ysoft.jdo.book.common.console.UserInterface.pumpCommands(UserInterface.java:186)
    at
    com.ysoft.jdo.book.library.client.Library.run(Library.java:139)
    at
    com.ysoft.jdo.book.library.client.Library.main(Library.java:104)
    NestedThrowablesStackTrace:
    kodo.util.DataStoreException: Invalid column type
    at
    kodo.jdbc.sql.DBDictionary.newDataStoreException(DBDictionary.java:3081)
    at
    kodo.jdbc.sql.SQLExceptions.getDataStore(SQLExceptions.java:77)
    at
    kodo.jdbc.sql.SQLExceptions.getDataStore(SQLExceptions.java:63)
    at
    kodo.jdbc.sql.SQLExceptions.getDataStore(SQLExceptions.java:43)
    at
    kodo.jdbc.runtime.PreparedStatementManager.flush(PreparedStatementManager.java:89)
    at
    kodo.jdbc.runtime.UpdateManagerImpl.flush(UpdateManagerImpl.java:445)
    at
    kodo.jdbc.runtime.UpdateManagerImpl.flush(UpdateManagerImpl.java:193)
    at
    kodo.jdbc.runtime.UpdateManagerImpl.flush(UpdateManagerImpl.java:95)
    at
    kodo.jdbc.runtime.JDBCStoreManager.flush(JDBCStoreManager.java:609)
    at
    kodo.runtime.DelegatingStoreManager.flush(DelegatingStoreManager.java:153)
    at
    kodo.runtime.PersistenceManagerImpl.flush(PersistenceManagerImpl.java:1122)
    at
    kodo.runtime.PersistenceManagerImpl.flushSafe(PersistenceManagerImpl.java:1005)
    at
    kodo.runtime.PersistenceManagerImpl.beforeCompletion(PersistenceManagerImpl.java:932)
    at
    kodo.runtime.LocalManagedRuntime.commit(LocalManagedRuntime.java:69)
    at
    kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:592)
    at
    com.ysoft.jdo.book.library.LibraryHandler.commitTransaction(LibraryHandler.java:175)
    at
    com.ysoft.jdo.book.library.client.CommitTransaction.execute(Library.java:279)
    at
    com.ysoft.jdo.book.common.console.UserInterface.execute(UserInterface.java:196)
    at
    com.ysoft.jdo.book.common.console.UserInterface.pumpCommands(UserInterface.java:186)
    at
    com.ysoft.jdo.book.library.client.Library.run(Library.java:139)
    at
    com.ysoft.jdo.book.library.client.Library.main(Library.java:104)
    NestedThrowablesStackTrace:
    java.sql.SQLException: Invalid column type
    at
    oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at
    oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
    at
    oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
    at
    oracle.jdbc.driver.OracleStatement.get_internal_type(OracleStatement.java:6164)
    at
    oracle.jdbc.driver.OraclePreparedStatement.setNull(OraclePreparedStatement.java:1316)
    at
    com.solarmetric.jdbc.DelegatingPreparedStatement.setNull(DelegatingPreparedStatement.java:369)
    at
    com.solarmetric.jdbc.PoolConnection$PoolPreparedStatement.setNull(PoolConnection.java:406)
    at
    com.solarmetric.jdbc.DelegatingPreparedStatement.setNull(DelegatingPreparedStatement.java:369)
    at
    com.solarmetric.jdbc.DelegatingPreparedStatement.setNull(DelegatingPreparedStatement.java:369)
    at
    com.solarmetric.jdbc.DelegatingPreparedStatement.setNull(DelegatingPreparedStatement.java:369)
    at
    com.solarmetric.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.setNull(LoggingConnectionDecorato
    r.java:792)
    at
    com.solarmetric.jdbc.DelegatingPreparedStatement.setNull(DelegatingPreparedStatement.java:369)
    at kodo.jdbc.sql.DBDictionary.setNull(DBDictionary.java:950)
    at
    kodo.jdbc.sql.OracleDictionary.setNull(OracleDictionary.java:450)
    at kodo.jdbc.sql.RowImpl.toSQL(RowImpl.java:828)
    at kodo.jdbc.sql.RowImpl.flush(RowImpl.java:1039)
    at kodo.jdbc.sql.RowImpl.flush(RowImpl.java:975)
    at
    kodo.jdbc.runtime.PreparedStatementManager.flushInternal(PreparedStatementManager.java:160)
    at
    kodo.jdbc.runtime.PreparedStatementManager.flush(PreparedStatementManager.java:84)
    at
    kodo.jdbc.runtime.UpdateManagerImpl.flush(UpdateManagerImpl.java:445)
    at
    kodo.jdbc.runtime.UpdateManagerImpl.flush(UpdateManagerImpl.java:193)
    at
    kodo.jdbc.runtime.UpdateManagerImpl.flush(UpdateManagerImpl.java:95)
    at
    kodo.jdbc.runtime.JDBCStoreManager.flush(JDBCStoreManager.java:609)
    at
    kodo.runtime.DelegatingStoreManager.flush(DelegatingStoreManager.java:153)
    at
    kodo.runtime.PersistenceManagerImpl.flush(PersistenceManagerImpl.java:1122)
    at
    kodo.runtime.PersistenceManagerImpl.flushSafe(PersistenceManagerImpl.java:1005)
    at
    kodo.runtime.PersistenceManagerImpl.beforeCompletion(PersistenceManagerImpl.java:932)
    at
    kodo.runtime.LocalManagedRuntime.commit(LocalManagedRuntime.java:69)
    at
    kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:592)
    at
    com.ysoft.jdo.book.library.LibraryHandler.commitTransaction(LibraryHandler.java:175)
    at
    com.ysoft.jdo.book.library.client.CommitTransaction.execute(Library.java:279)
    at
    com.ysoft.jdo.book.common.console.UserInterface.execute(UserInterface.java:196)
    at
    com.ysoft.jdo.book.common.console.UserInterface.pumpCommands(UserInterface.java:186)
    at
    com.ysoft.jdo.book.library.client.Library.run(Library.java:139)
    at
    com.ysoft.jdo.book.library.client.Library.main(Library.java:104)
    enter command:
    -->

  • How to get the today's julian date in java?

    how to get the today's julian date in java?
    hi can any one tell me how to get the todays julian date using Calender class or GregorianCalender class....
    Julian date for 2006.November.01 AD 05:54 PM : 2454041.0
    i have tryied with
    calJ.setGregorianChange(new Date(Long.MAX_VALUE));
    System.out.println(sdf2.format(calJ.getGregorianChange()));
    thanks
    Tushar
    Message was edited by:
    lad_tushar

    thanks a lot....for intrest....
    I have found some details about the Julian calendar as follows:
    The Julian date for 2006: JAN: 01:12:01:59 is 2453737.00138
    245 represent the year digits for year 2006
    3737 represent the date fir 1 Jan
    .00138 represents the time for 12:01:59
    Julian date change as per every day 12 noon it increase one digit in it.
    As per ref from
    http://www.aavso.org/observing/aids/jdcalendar.shtml
    Also chk this calendar where Julian date is 20. October 2006 for 02 November 2006
    As per ref from
    http://www.calendar.sk/julian_calendar-en.php
    I have tried the pure �GregorianCalendar� class from jdk1.4 API and its setGregorianChange method but not getting as per the expected Julian date format. Using the �setGregorianChange()� i have setting the cutover date to Long.MAX_VALUE it means GregorianCalendar now have to act as per the Julian calendar ...so after setting the cutover date it return me changed date using �getGregorianChange()� but that was not the Julian date of the current date...as expected or as per above both scenario. Even though the last two digits are nowhere equal to the actual Julian date.
    Program
    GregorianCalendar cal = new GregorianCalendar();
    cal.setGregorianChange(new Date(Long.MAX_VALUE)); // setting the calendar to act as a pure Julian calendar.
    // cal.set(Calendar.DATE, new Date().getDate()); // seting the current date
    // Date todayJD = cal.getGregorianChange(); // getting the changed date after the setGregorianChange
    Date todayJD = cal.getTime(); // getting the calculated time of today�s Julian date
    SimpleDateFormat sdfJulianDate = new SimpleDateFormat("yyDDD");
    SimpleDateFormat sdfJuliandayOfYear = new SimpleDateFormat("DDD");
    System.out.println("today Date = " + new Date());
    System.out.println("Today as julian date = " + sdfJulianDate.format(todayJD));
    System.out.println("Today as day of year = " + sdfJuliandayOfYear.format(todayJD));
    OUTPUT:
    USING : Date todayJD = cal.getGregorianChange();
    Today Date = Thu Nov 02 15:17:05 IST 2006
    Today as julian date = 94229
    Today as day of year = 229
    USING : cal.set(Calendar.DATE, new Date().getDate());
    Today Date = Thu Nov 02 15:19:22 IST 2006
    Today as julian date = 06319
    Today as day of year = 319
    USING : Date todayJD = cal.getTime();
    Today Date = Thu Nov 02 15:17:59 IST 2006
    Today as julian date = 06306
    Today as day of year = 306
    There is one another concept i found to get the Julian day of the year as per the Julian day chart mention on nasa site (http://angler.larc.nasa.gov/armsgp/JulianDayChart.html) and i m getting the moth of the year that is 306 for nov 02 2006 using getTime() method in above code then the out put is right for Julian day. But it was not as per the expected Julian date format. So in conclusion we can only able to retrieve the day of year for the Julian calendar. hope their will be a solution for this problem in java api ....else we allways have to depend upon the third party api that was not accepteble some times.....
    Kindly chk chart on the site
    http://angler.larc.nasa.gov/armsgp/JulianDayChart.html
    http://weather.uwaterloo.ca/julian.html
    http://www.fs.fed.us/raws/book/julian.shtml
    Thanks,
    Tushar Lad

  • Data Associtions not enabling  while i am  trying to do data mapping with data Associtions in BPM studio what is the reson?

    Data Associtions not enabling  while i am  trying to do data mapping with data Associtions in BPM studio what is the reson?

    Shouldn't @StartDate be an input parameter to the stored procedure? @RunDate also?
    Example for sp with parameters:
    http://www.sqlusa.com/bestpractices2008/stored-procedure-parameters/
    The last error will go away upon a successful sp compile.
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • BizTalk Map: Grouping CRM Response XML based on the ID field in Custom XSLT

    Hi,
    I will receive a CRM response as below. 
    <ns0:RetrieveMultipleResponse xmlns:ns0="http://schemas.microsoft.com/xrm/2011/Contracts/Services" xmlns:ns2="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:ns3="http://schemas.microsoft.com/xrm/2011/Metadata" xmlns:ns5="http://schemas.microsoft.com/2003/10/Serialization/" xmlns:ns1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" xmlns:ns4="http://schemas.microsoft.com/xrm/2011/Contracts"><ns0:RetrieveMultipleResult>    <ns4:Entities>      <ns4:Entity>        <b:Attributes xmlns:b="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts/Services" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic">            <b:KeyValuePairOfstringanyType>            <c:key>ccx_datevaccineinfostatementpresented</c:key>            <c:value i:type="d:dateTime" xmlns:d="http://www.w3.org/2001/XMLSchema">2012-08-14T04:00:00Z</c:value>          </b:KeyValuePairOfstringanyType>          <b:KeyValuePairOfstringanyType>            <c:key>ccx_administeredamount</c:key>            <c:value i:type="d:decimal" xmlns:d="http://www.w3.org/2001/XMLSchema">0.75000000</c:value>          </b:KeyValuePairOfstringanyType>          <b:KeyValuePairOfstringanyType>            <c:key>ccx_immunizationid</c:key>            <c:value i:type="d:guid" xmlns:d="http://schemas.microsoft.com/2003/10/Serialization/">826c2b0e-a349-e411-866c-00155d1e1f77</c:value>          </b:KeyValuePairOfstringanyType>     </b:Attributes>  </ns4:Entity>   <ns4:Entity>        <b:Attributes xmlns:b="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts/Services" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic">            <b:KeyValuePairOfstringanyType>            <c:key>ccx_datevaccineinfostatementpresented</c:key>            <c:value i:type="d:dateTime" xmlns:d="http://www.w3.org/2001/XMLSchema">2012-08-14T04:00:00Z</c:value>          </b:KeyValuePairOfstringanyType>          <b:KeyValuePairOfstringanyType>            <c:key>ccx_administeredamount</c:key>            <c:value i:type="d:decimal" xmlns:d="http://www.w3.org/2001/XMLSchema">0.25000</c:value>          </b:KeyValuePairOfstringanyType>          <b:KeyValuePairOfstringanyType>            <c:key>ccx_immunizationid</c:key>            <c:value i:type="d:guid" xmlns:d="http://schemas.microsoft.com/2003/10/Serialization/">766c2b0e-a349-e411-866c-00155d1e1f77</c:value>          </b:KeyValuePairOfstringanyType>     </b:Attributes>  </ns4:Entity><ns4:Entity>        <b:Attributes xmlns:b="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts/Services" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic">            <b:KeyValuePairOfstringanyType>            <c:key>ccx_datevaccineinfostatementpresented</c:key>            <c:value i:type="d:dateTime" xmlns:d="http://www.w3.org/2001/XMLSchema">2012-08-14T04:00:00Z</c:value>          </b:KeyValuePairOfstringanyType>          <b:KeyValuePairOfstringanyType>            <c:key>ccx_administeredamount</c:key>            <c:value i:type="d:decimal" xmlns:d="http://www.w3.org/2001/XMLSchema">0.7500000000</c:value>          </b:KeyValuePairOfstringanyType>          <b:KeyValuePairOfstringanyType>            <c:key>ccx_immunizationid</c:key>            <c:value i:type="d:guid" xmlns:d="http://schemas.microsoft.com/2003/10/Serialization/">826c2b0e-a349-e411-866c-00155d1e1f77</c:value>          </b:KeyValuePairOfstringanyType>     </b:Attributes>  </ns4:Entity></Entities></ns0:RetrieveMultipleResult></ns0:RetrieveMultipleResponse>
    I have  to count the distinct Entities based on ccx_immunizationid value & also I have to group the fields if both entity has same immunization ID. If the xml file (without namespace) and the field is <ccx_immunizationid>2323</ccx_imunizationid>,
    I can use something like below,
    <xsl:template match="//Entity/Attributes[not(./ccx_immunizationid= preceding::ccx_immunizationid)]">
    but here, I have to look for the key 'ccx_immunizationid' and its value. 
    I am using custom xslt in BizTalk map. Please help. Thanks.
    Regards,
    Lakshmi

    You need to get the distinct record filtered by "value" field whose "key" is "ccx_immunizationid" i.e <c:key>ccx_immunizationid</c:key>".
    So you need to use the XPath with syntax: 
    /*[not(@name = preceding::*/@name)]
    So in your case, the XPath value will be like the following:
    /*[local-name()='RetrieveMultipleResponse' and namespace-uri()='http://schemas.microsoft.com/xrm/2011/Contracts/Services']/*[local-name()='RetrieveMultipleResult' and namespace-uri()='http://schemas.microsoft.com/xrm/2011/Contracts/Services']/*[local-name()='Entities' and namespace-uri()='http://schemas.microsoft.com/xrm/2011/Contracts']/*[local-name()='Entity' and namespace-uri()='http://schemas.microsoft.com/xrm/2011/Contracts']/*[local-name()='Attributes' and namespace-uri()='http://schemas.microsoft.com/xrm/2011/Contracts']/*[local-name()='KeyValuePairOfstringanyType' and namespace-uri()='http://schemas.microsoft.com/xrm/2011/Contracts'][*[local-name()='key' and namespace-uri()='http://schemas.datacontract.org/2004/07/System.Collections.Generic']/text() ='ccx_immunizationid'][not(*[local-name()='value' and namespace-uri()='http://schemas.datacontract.org/2004/07/System.Collections.Generic'] = preceding::*[local-name()='value' and namespace-uri()='http://schemas.datacontract.org/2004/07/System.Collections.Generic'])]
    You may need to change the namespaces according to yours. This XPath would give you an idea of how to use the distinct XPath (1.0) snystax as shown above in your XML.
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Function module to convert calender date to Julian date format

    Hi,
    Is there any FM which can convert Calendaer Date to <b>Julian Date</b> format?
    Thanks.
    Regards,
    Madhu

    It is not a func mod... but it is pretty straight forward.
    data: julian_day(3) type n,
    date_aux type d,
    date_I_need type d.
    first day of the year
    concatenate date_I_need(4) '0101' into date_aux.
    julian_day = date_I_need - date_aux.
    julian_day = julian_day + 1.

  • Must a EntityBean map with data table?

    I know Not every data table will map with Entity bean
    but must a EntityBean map with a datatable?
    rgds

    Ofcourse Not, EntityBean Just A style of Bean,
    We declare something as EntityBean because it perform some action like a Entity
    For Example,A Man Contain some attribute, or A File with some attribute,
    usually we have store this in the database ,so EntityBean Usually map with data table.
    but you can also store the data in the file format as you like,you can control it in the BMP model
    in my opinion ,Entitybean is the object base on the attribute , the Sessionbean is the object base on the action with the user.So we can distinguish them��:-)

  • How to convert julian Date into Calendar Date

    Hi,
    I want convert julian Date to calendar Date (mm/dd/yyyy or mm/dd/yy format) in java.
    Can any one help me how to convert julian date to calendar Date.
    Thanks,
    Krishore.

    import java.util.*;
    import java.text.*;
    public class jdate {
    Calendar date;
    public jdate(int j)
    date = Calendar.getInstance();
    date.set(Calendar.DAY_OF_YEAR, j);
    public String toString()
    SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy");
    return (formatter.format( date.getTime() ));
    public static void main(String args[])
    if(args.length == 1)
    int j = Integer.parseInt(args[0]);
    jdate julian = new jdate(j);
    System.out.println("Julian date(" + j + ") = " + julian.toString());
    }

Maybe you are looking for

  • Can not open some PDFs in Outlook

    I can not open PDFs in 2010 Outlook from just one particular email. Other PDFs from other emails open fine. have uninstalled and re-installed latest Adobe Reader. How do I fix?

  • IPhone 5 call quality issue. (Either call ends or very choppy on the other end)

    At random times my calls don't go through. The phone says call ended and doesn't ring. The reception is either full or close to full. This has occurred numerous times while calling different numbers. If I do manage to get the phone to ring, the perso

  • IMac freezing, white screen

    For the last week now, my iMac 24" has been freezing up while doing small tasks - emptying trash, moving things on the desk top, iTunes songs will stutter or pause for a long time during play, opening programs... I try CmdOptEsc to get to a force qui

  • Windows Installer 3.0 and ZFD 3.2

    We just got an application that uses, and requires, Windows Installer 3.0 upon deployment. None of our Windows 2000 or Windows XP computers has that version of installer, yet... What issues are there with installing the installer and this application

  • Return line and format bold in text Objetc

    In CrystalReports how to insert return line in text Objetc and how to apply format bold to some word inside a paragraph. ¿Exist some internal command of Crystal that he indicates that from a position within the paragraph he is applied format bold?