Sort data Date wise(YYYY-MM-Date) in BPEL output

HI,
Can any one help me, how to write code for sort data Date wise(YYYY-MM-Date) .
I pass the input as Name from the service wsdl(Exposed Services) and its call the third party service(External References) , its return the output like below one,
Name:Vodafone
Pole:INdia
End Date:2012-05-12
Name:Airtel
Pole:USA
End Date:2012-05-13
Name:Uninor
Pole:Canda
End Date:2020-10-13
Name:Celltell
Pole:INdia
End Date:2011-03-21
Above o/p in Random way, but i need this one in sort data date wise.
Finally i need output based on the latest End Date..
like,
Name:Uninor
Pole:Canda
End Date:2020-10-13
Name:Airtel
Pole:USA
End Date:2012-05-13
Name:Vodafone
Pole:INdia
End Date:2012-05-12
Name:Celltell
Pole:INdia
End Date:2011-03-21.
Could you please help me the format of code, and where to i implement this one. its very urgrnt.
Regards,
Harsih

Hi
Sukanya,
Thanks for ur quick replyy, i fetch data from external reference onlyy. If i fetch data from DB what u said its exactly right.
Re: Sort data Date wise(YYYY-MM-Date) in BPEL output 

Similar Messages

  • Sort a tableview column containing a date

    This is my second request to find more info on handling dates javafx2, no replies to the first so am trying again.
    I am a relative "newby" to java, FX2 has so many compelling features I really want to use it.
    Displaying and sorting on dates seems like such a fundamental requirement that I am surprised that I can't find any examples anywhere on handing dates in a tableview.
    This would be so easy to do in Cocoa with the "date formatter" so apologies if I am missing something obvious.
    If I use a formatted date the column sorts on the text not on the actual date.
    eg. starting with
    06/01/2012
    08/01/2011
    07/01/2012
    sorting ascending gives
    06/01/2012
    07/01/2012
    08/01/2011
    and descending
    08/01/2011
    07/01/2012
    06/01/2012
    both wrong!
    Same issue if I use a calendar in the cells.
    Hope the answer is not to have a separate column for day, month and year.

    Hi wornish,
    TableView sort can be customized as per our needs. A sample example of Date is given here:
    Currently Let's suppose that you are displaying data of "Date" in String form using SimpleDateFormat class.
    TableView<Date> view = new TableView<Date>();
    TableColumn<Date,String> col = new TableColumn<Date,String>("Date");
    col.setComparator(new Comparator<String>(){
         @Override
         public int compare(String t, String t1) {
            try{
              SimpleDateFormat format =new SimpleDateFormat("MM-dd-YYYY");
              Date d1 =format.parse(t);               
              Date d2 = format.parse(t1);
              return Long.compare(d1.getTime(),d2.getTime());
            }catch(ParseException p){
                 p.printStackTrace();
            return -1;
    col.setCellValueFactory(new Callback<CellDataFeatures<Date, String>, ObservableValue<String>>() {
         @Override
         public ObservableValue<String> call(CellDataFeatures<Date, String> param) {
              SimpleDateFormat format = new SimpleDateFormat("MM-dd-YYYY");
              return new SimpleObjectProperty(format.format(param.getValue()));
            Thanks
    Narayan

  • Stock on posting date GL wise

    dear sir,
    can i have the transaction code for stock on posting date GL wise.
    IN MB5B THERE IN NO FIELD WITH GL AND IN MB5B THERE IS NO POSTING DATE

    Hi,
    There is a posting date in MB5B  !!!!!!!!!!!!!!!!!
    The whole point of MB5B is to give you the stock on a posting date.
    The field is called "Selection date".
    Steve B

  • My iMac PowerPC G4 will not connect to my Belkin N  router. I have not been able to connect for so long that I actually gave up on this computer until today, so it is a little out of date software wise. It is running OS 10.3.9.

    First off i apoligize for the title length, a bit new to help forums and didnt realize thats what that was .
    Anyways;
    My iMac PowerPC has been having this issue for quite a few years, prompting me to flat out replace it. I recently had a friend come to need a computer, and told them they could have it once i got it working.
    The unfortunate problem that i luckily discovered: my friend and i use the same brand / model of Router, the Belkin N+ (N plus incase it removes the plus sign like it did in the title).
    Ive tried everything i know, which isnt much. I've verified the password is correct, ive restarted the computer, and ive restarted my modem and router. Nothing works.
    I should mention also that the computer is out of date program wise (obviously) since i havent been able to connect with it in so long. I am still using Internet Connect, and the computer still gives me the option to try .Mac.
    Any help would be greatly appreciated.
    Dean

    The router is much, much newer than the computer, perhaps some characteristic of the WiFi network as it's currently setup is preventing the computer from connecting.
    Try to go back to the basics: set your WiFi network to "b" mode only (i.e., turn off "g") and termporarily remove the password from it. See if the computer will at least establish a connection at that point. Then start turning on one thing at a time ("g" mode, then security, etc).
    Not sure what format your WEP key is, but if it's not 10 characters (the minimum for the standard, which constitutes a 64-bit key), you can try making it that long. If it's 13 or 26 characters, it might be a higher encryption than the computer can support.
    If all else fails, you could try looking on ebay/craigslist for a copy of Tiger to install on the iMac, which would have software support for more WiFi encryption schemes. Also, it would provide software support for USB WiFi adapters that would also be able to connect to more modern networks.

  • Query records using a date DD-MON-YYYY in Forms 6i and 10g

    In Forms 6i, I can query records by entering >20-dec-2006 in a date field which has length of 12 with a date format mask DD-MON-YYYY in date item property. Once this form is converted to 10g, I can only enter >2-dec-2006 for querying. If trying to enter the >20-dec-2006, then, it becomes >20-dec-200 and have no record found. Although I have the date length increased to 20, the result stays the same: can't enter 2 digits for day.
    Thanks for your help in advance.

    Appreciate your help. The date field has a format mask of DD-MON-YYYY. By entering >2-dec-2005 it will automatically be displayed as >2-DEC-2005 in Forms 6i or 10g. Also, the query property has case insensitive checked as Yes. The problem is with 10g, I can not enter anything at the 12th position. I can enter the date up to the 11th position >20-dec-200. In Forms 6i, this is not a problem. Thanks.

  • Using JavaScript need to Sort subsite site collection based on date in descending order

    Hi,
    Below is my code, where i need to sort the " webCollection
    = web.getSubwebsForCurrentUser(null)" web collection based on the web.get_created() in
    descending order. How could i do it any suggestions. Also i need it in JavaScript.
    <script src="/_layouts/15/sp.runtime.js" type="text/javascript"></script>
    <script src="/_layouts/15/SP.js"></script>
    <script type="text/javascript">
    var context = SP.ClientContext.get_current();
    var web = context.get_web();
    ExecuteOrDelayUntilScriptLoaded(getWebProperties, "sp.js");
        function getWebProperties() {
                    webCollection = web.getSubwebsForCurrentUser(null);
            context.load(webCollection)
            //ctx.load(this.web);
            context.executeQueryAsync(Function.createDelegate(this, this.onSuccess),
                Function.createDelegate(this, this.onFail));
        function onSuccess(sender, args) {
            //alert('web title:' + this.web.get_title() + '\n ID:' + this.web.get_id()
    + '\n Created Date:' + this.web.get_created());
            alert("Number of sites: " + webCollection.get_count());
                   var webEnumerator = webCollection.getEnumerator();
                    while (webEnumerator.moveNext()){
       var web = webEnumerator.get_current();
      alert("Title="+web.get_title() +"\n"+ "Created="+web.get_created());
        function onFail(sender, args) {
            alert('failed to get list. Error:'+args.get_message());
    //getWebProperties();
    </script>
    Thanks!
    MCTS- Please vote and mark posts as answered where appropriate.

    Hi,
    According to your post, my understanding is that you wanted to sort the subsite based on the date in descending order.
    You can refer to the following code snippets, it sorts the subsites by the date in descending order.
    <script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    // When the body is loaded, the onload event handler executes each function whose name is contained in this array.
    _spBodyOnLoadFunctionNames.push("callCSOM");
    function callCSOM()
    $("#Button1").click(function()
    ExecuteOrDelayUntilScriptLoaded(RetriveSites, "sp.js");
    var currentcontext = null;
    var currentweb = null;
    function RetriveSites()
    currentcontext = new SP.ClientContext.get_current();
    currentweb = currentcontext.get_web();
    this.subsites = currentweb.get_webs();
    currentcontext.load(this.subsites);
    currentcontext.executeQueryAsync(Function.createDelegate(this, this.ExecuteOnSuccess),
    Function.createDelegate(this, this.ExecuteOnFailure));
    function ExecuteOnSuccess(sender, args)
    var subsites = '';
    var enum1 = this.subsites.getEnumerator();
    var siteCreatedTime = '';
    var array=new Array();
    while (enum1.moveNext())
    var site = enum1.get_current();
    array.push(new Array(site.get_created(),site.get_title()));
    alert(array);
    array=sortMethod(array);
    alert(array);
    function sortMethod(arr) {
    var i, j, stop, len = arr.length;
    for (i=0; i<len; i=i+1)
    for (j=1;j<len - i; j++)
    // change the "<" to ">" would be sort by the Ascending.
    if (new Date(arr[j-1][0]) < new Date(arr[j][0]))
    //swap(j, j+1);
    var temp = arr[j-1];
    arr[j-1] = arr[j];
    arr[j] = temp;
    //alert(new Date(arr[j]));
    return arr;
    function ExecuteOnFailure(sender, args) {
    alert("error");
    </script>
    <input id="Button1" type="button" value="Run Code"/>
    Results:
    Sort before:
    Sort after:
    Thanks,
    Jason
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected].
    Jason Guo
    TechNet Community Support

  • IPhoto, sort by date is not a true date/time sort

    In iPhoto, sort by date is not a true date/time sort.  If you have two cameras with there own naming convention iPhoto sorts filename by date separating the two cameras in the view. Is there a way to sort by DATE&TIME ONLY?

    Using two cameras using iPhoto to upload pictures.
    Both cameras are set to the correct time and date.
    Connect camera ONE filenames IMGP0101
    By default:
    No event name
    Split events checked
    Select import 12 photos
    Creates events:
    Untitled event December 27, 2013
    In order by time
    Untitled event December 28, 2013
    In order by time
    Untitled event December 29, 2013
    In order by time
    Untitled event December 30, 2013
    Connect camera TWO filenames IMG_1101
    By default:
    No event name
    Split events checked
    Select import 12 photos
    Creates events:
    Untitled event December 28, 2013
    In order by time
    Untitled event December 29, 2013
    In order by time
    Untitled event December 30, 2013
    Now I have 2 events for each of December 28, 29 and 30 they are not all under the same event name. My only option is to click and drag the pictures from the second set of events to the first set of events then they are in order.  This is a real pain to do.  There needs to be a way to reset the event dates so all pictures from both cameras end up in the right event date.

  • In IOS 6 my date format was YYYY-MM-DD. When I switched to IOS 7, it changed to MM-DD-YYYY. How do you change it?

    In IOS 6 my date format was YYYY-MM-DD, which is ISO 8601 standard used in Canada.  When I switched to IOS 7, it changed to MM-DD-YYYY format which is very confusing as all my cameras etc use YYYY-MM-DD.  How do you change it, like one can in OSX?

    It appears previous versions of IOS would pick up your preferred date format from your OSX Mac. You can modify that to whatever you like.
    Now if you select Canadian or American in IOS 7 you get only MM-DD-YYYY.  This is wrong for Canada as the preferred date format here is YYYY-MM-DD, just check your birth or expiry dates on your Ontario Drivers License or OHIP Health Card.  Or the date field at the bottom left of any Government of Canada website.
    The trouble with using other Country codes is you tend to get their currency codes like € or £ and the terms like yesterday and today in their language.

  • Sort all the Records in Data manager based on Update Date

    How to sort the reocrds in Data Manager based on Date or something ?
    And also I have three records for a same customer in ( for three different company codes ) and when I search for this customer with the Customer number then it is showing three records , but when I search with Update Date then no records are fetched ...what is the reason ?

    If you make a field as type "Time Stamp" in your data model using the MDM Console, make sure that the option Sort Index is set to Normal.  If this is the case, whenever a record is updated in the repository, the date will be updated.  If the sort index is normal, then MDM will allow you to sort the records based on the date and time by which they were updated.  You can do this by finding your time stamp field in the MDM data manager and clicking on it.  If there is an up and down arrow next to the name of your field, it means it can be sorted.  Also, to answer your other question, you can definitely search based on date.  Use the Free-Form Search on the left hand side of the data manager at the bottom of the screen.  Simply select a date, and it will show you all the records updated on that date.

  • How to extract G/L Acount wise sales(Billing Data) form SAP R/3 to SAP BW

    Hi All,
    is there any procedure to bring  G/L Account wise  sales billing data from R/3 to BW.
    can anybody have tried this?
    regards
    mhreddy

    HI sankar,
    you can refer the belkow link to find the details on the relevant extractors and infoproviders
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/17/416d030524064cb2b8d58ffb306f3a/frameset.htm
    Regards,
    Sathya

  • How to convert string yyyy-mm-dd to date dd/mm/yyyy

    Hi Experts,
    I am getting date in the form of string 2007-06-30 from R/3. How I can convert this string into a date in the form 30/06/2007. I have to use java.sql.Date.
    Following code is not working. As for executing the following code, I have to use java.util.date. I can not use java.util.date as the Web Dynpro program uses java.sql.Date.
         SimpleDateFormat sdf1 = new SimpleDateFormat("dd/mm/yyyy");
         Date d = null;
         d = sdf1.parse(wdContext.currentContextElement().getDateClicked());
    Regards,
    Gary

    Hi,
    If I understood you right you need this date typed as a java.sql.Date?
    String ds=wdContext.currentContextElement().getDateClicked();
    SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");     
    java.sql.Date sd = new java.sql.Date(sdf.parse(ds).getTime());
    Four remarks:
    We "transport" the Date from java.util.Date to java.sql.Date as milliseconds since January 1, 1970, 00:00:00 GMT. See contract of java.sql.Date.
    You used dd/mm/yyyy instead of dd/MM/yyyy, but mm are the minutes and not the months, see the contract of [SimpleDateFormat|http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html] (JSE 1.4) .
    You do not set the time zone for DateFormat, so you use TimeZone.getDefault(). This is your JVM's default time zone and depends (if you did not change it) on your systems time zone. F.e. I live in Germany, the time zone of my system is currently MEZ (which is UTC+1) since we left the daylight saving time zone last sunday. Since you only parse the date and not the time zone f.e., you expect the date (the string) to be in your default time zone. If this is not the case, you have to set the time zone to the time zone you expect the date to be in (f.e. sdf1.setTimeZone(TimeZone.getTimeZone("UTC"));) before parsing the date. This might seem marginal in your case, but may produce unexpected results with date comparisons and date parsings around the day change.
    SimpleDateFormat is not thread-safe, so please do not cache it! This is not mentioned in the Javadoc of JSE 1.4, but can be looked up at [Sun's bug database|http://bugs.sun.com/bugdatabase/view_bug.do;jsessionid=96669461418011fffffffffb70dd6b6e88eb5?bug_id=4264153]. If you are not satisfied with the standard Date & Time handling (f.e. performance reasons) you might want to consider an alternative like [Joda Time|http://joda-time.sourceforge.net/index.html] which is published under [ASF 2.0 license|http://joda-time.sourceforge.net/license.html]
    Best regards,
    Fabian

  • How to convert Date format from yyyy mm dd   to   dd mmm yyyy in ADF

    Hi,
    I have Date Format in Data Base as yyyy mm dd, but in the UI I want to display the format as dd mmm yyyy, which code I have to write to get the required format in JDev 11.1.2.3

    Hi,
    Use converter : &amp;lt;af:convertDateTime&amp;gt;
    See also : convertDateTime Demo
    -Arun

  • Converting Java.util date to XML date in format YYYY-MMM-dd

    I'm using below code to convert java.util.date to XML date
    public static XMLGregorianCalendar toXMLDate(Date dte) {
       try {
       // this may throw DatatypeConfigurationException
       DatatypeFactory datatypeFactory = DatatypeFactory.newInstance();
       GregorianCalendar calendar = new GregorianCalendar();
       // reset all fields
      calendar.clear();
       Calendar parsedCalendar = Calendar.getInstance();
      parsedCalendar.setTime(dte);
      calendar.set( parsedCalendar.get(Calendar.YEAR ),
      parsedCalendar.get(Calendar.MONTH),
      parsedCalendar.get(Calendar.DATE ));
       XMLGregorianCalendar xmlCalendar = datatypeFactory.newXMLGregorianCalendar( calendar );
      xmlCalendar.setTimezone( DatatypeConstants.FIELD_UNDEFINED );
      xmlCalendar.setFractionalSecond( null );
       return xmlCalendar;
    I need to get the date in the format YYYY-MMM-dd, but it returns in a format YYYY-MM-dd. Can anyone tell me how can i change the format? Thanks

    >
    The snippet of ApplicationClient where the assignment took place and the syntax occurred were:
    1. DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
    2. DateFormat timeFormat = new SimpleDateFormat("HH:mm:ss");
    3. Date date = new Date();
    4. CustomerDetail customerDetail = new CustomerDetail();
    5. customerDetail.setCollectionDate(dateFormat.format(date)); //got the above syntax error
    6. customerDetail.setCollectionTime(timeFormat.format(date)); //got the above syntax error
    .....I am running JDK 1.6.0_10, Glassfish v2r2, MySQL 5.0, Netbeans 6.1 on Windows XP platform.The format method returns a String not a Date. Why not just store the Date as is without formatting, and format it when you want to retrieve it from the DB and display it?
    m

  • Is there a way to sort pdf by date created rather than by date added?

    In iBooks in Mavericks, is there a way to sort pdf by date created rather than by date added?

    I noticed that the "Year" information and "Release Date" information are usually wrong.
    For example, the song "The Twist" by Chubby Checker has 2007 for the year and 3/5/2007 as the release date. I understand that this is the release date of the greatest hits compilation album, but not the song.
    Is there any way to change the dates so that I can sort by year? I would like 60s songs to appear with a 1960s year or release date.

  • How Can I Sort/Order My Photos By 'Modified Date' ?! Not Taken Date :/  iOS5

    Hii, I'm From Panama... And I'm havin' this issue, Ok Let me explain to you guys (I hope u can help me out).
         Look, Before I Updated my iPod Touch From iOS 4.3.5 to iOS 5 I had my photos (an specific album) sort by Modified Date, But now that I updated to iOS 5, I try to sync all the photos again and they're like shuffled =S.... I only know that it isn't sort Alphabetically, by Size nor Modified Date (Like I said Before), But, I Wanna' know if there's a way to organize all the photos likee i had before.. On my pc, they're like I want it (By Modified Date) But when i sync it, i get shuffled agaiin =S I Don't Know The Order That iOS 5 Sync The Photos..!!!
    P.S.: It is So Important to me, because, I'm taking about my relationship album (all photos are w/my girlfriend, are likee 700 photos, that we've been taking from our 5th months together until now, we're on our 13th months of pure love <3 _ <3').. I Hope someone of u can help me to get out of this lil' trouble/issue with my iOS 5 Device..!! Thnkz, And sorry if i wrote too much, i can't explain my self as well in English =/
    'SaiO'

    Although the original post is a few weeks old, I suspect that many people are still having the same issue.
    I'm using the List view (the old view), which presents the Podcasts in the Programme-name alphabetical order:
    As G3gator says, "something " needs exterminating!
    Phil

Maybe you are looking for