Date comparison in scripts

Hi all,
/: If &vbrk-fkdat& <  '31.12.2006'.
/:    include my_logo.
/: else.
/:    include your_logo.
/: endif.
I want to compare dates in scripts text element. how to do.
the &vbrk-fkdat& is holding 19.06.2006. and showing 'your_logo' but i need 'my_logo'.
Please find out is there any mistake in dates comparison. or let me know how compare dates
Helpful answeres are surely rewarded.

Hi all,
Thanks for your suggestions.
the solution is
/: define &dates& = '31.12.2006'.
/: SET DATE MASK = 'YYYYMMDD'.
/: If &vbrk-fkdat& < &dates&.
/: include my_logo.
/: else.
/: include your_logo.
/: endif.
/: SET DATE MASK = ''. -
> to reset date mask

Similar Messages

  • Date Comparison

    Hello All,
    UCCX 9
    Scenario: I would like the script to do a date comparison so that if Today's date is before xx/xx/xx or after xx/xx/xx I can direct it to different steps in the scripts.
    I have 3 string variables
    Current_Date  - Changes depending on the day
    Begin_Date    - 2/1/2014
    End_Date      - 2/10/2014
    Step 1
    I have an IF statement
    If Current_Date < Begin_Date
    -True Goes to Time_of_Day_check
    -False Goes to End_Date_check
    Step 2
    If the above outcome is False it checks the End_Date
    IF Current_Date >End_Date
    -True   Goes to Time_of_Day_check
    -False Goes to Alternative Time_Of_Day_check
    The issues I'm having is with Step 2
    When the End_Date is less than 2/6/2014 it works fine.
    For example if End_date is 2/3/2014 it goes to True, which is correct.
    However,
    When the date is 2/10/2014, it still goes to True.., which is incorrect
    When I change the End_Date to 3/1/2014, then it starts going to False
    Am I unable to compare dates like this?  Is there a better way to compare dates?
    Thank you,

    I'm not sure I understand what you're doing, in order to give you an answer, however, I can tell you that Date objects, not Strings, are what you're going to want to work with when performing comparisons.
    Date object values are also just a Long value for the number of milliseconds since Jan 1, 1970 at 00:00:00.000 AM.
    It's key that you understand that it's the number of millisecond that it's holding.  Which explains why this is true today:  D[now] > D[2/6/2014].  Today being 2/6/2014 of course.  That because D[now] holds the current time the step is executed, whereas D[2/6/2014] is left to hold the time 00:00:00.000.  And no matter what time it is when the script executes, there's only a 1/86400000th of the day's time that they will be equal, which will make the conditional false.  Therefore, you would enter D[now] >= D[2/6/2014], which would be true for all 86400000 milliseconds of the day.  I, like you, would have expected that original condition to be false, because today is not after 2/6/2014; today is 2/6/2014.
    The easiest way, in my opinion, to compare two dates, without consideration for their time values, is to reset the time values of both objects to the same value.
    E.g.,
    Set today = new Date()Set today = new Date(today.getYear(), today.getMonth(), today.getDate())Set start_date = new Date(2014 - 1900, 2, 6)Set end_date = new Date(2014 - 1900, 2, 14)If (today >= start_date && today <= end_date)     True          Goto Alt ToD     False          Goto ToD
    Anthony Holloway
    Please use the star ratings to help drive great content to the top of searches.

  • How to get the context data using java script in interactive forms

    Hi All,
    How to get the context data using java script in interactive forms by adobe,  am using web dynpro java
    thanks.

    Hi venkat,
    Please Refer this link.
      Populating one Drop-Down list from the selection of another Drop-down list
    Thanks,
    Raju.

  • Report customer master data comparison

    Hello Experts,
    Using transaction SE38, we would like to run report customer master data comparison. Could anyone provide the report name?
    Thank you

    Hi Thanks.
    Can you provide report used for sales summary?
    Thanks again

  • Idoc data  comparison between different R/3 clients.

    Hi ppl ,
    Is there a way idoc comparison can be done between different clients without going
    by Segment by Segment comparison ?
    I have a requirement wherein i have thousands of idocs in QA system and i need to
    compare those with the ones in PROD system. The segments in the idocs may vary
    depending on the data that flows from the third party system which will post idocs in R/3.
    So, the segment wise comparison of data is also ruled out .
    Do we have any standard reports which will help in achieving this purpose ?
    Please let me know how the idoc data comparison can be carried out .
    Regards,
    Nick.

    Hi Nick,
    There is no standared tools available for comparing the data of two idocs.
    By using beyond compare s/w you can check the data, but the thing is you have to download the idoc data to file format.
    By using Idoc_xml_transform function module you can download idoc data to xml format, after you can compare.
    Check this
    http://download.cnet.com/Beyond-Compare/3000-2242_4-10015731.html
    Regards
    Ramesh

  • Date format in Scripts

    Dear All,
    I want to change date format in script text elements. Now the date format is MMDDYYYY. Now I want change it into DDMMYYYY. How I can change that.
    Thanks and regards,
    Krish....

    WRITE ONE Z PROGRAM .
    EX. ZTEST
    write the code below.
    PROGRAM ZTEST.
    form GET_NEWDATE tables in_tab STRUCTURE itcsy
    out_tab STRUCTURE itcsy.
    DATA : LV_NEWDATE TYPE D.
    DATA : LV_OLDDATE LIKE OLDDATE,
    data : gv_dd(2) type c,
    gv_mm(2) type c,
    gv_yy(4) type c.
    data : date(8) type c.
    gv_dd = LV_OLDDATE(+22).
    gv_mm = LV_OLDDATE(2).
    gv_yy = LV_DOC_DATE+4(4).
    CONCATENATE gv_dd gv_mm gv_yy INTO date.
    LV_NEWDATE = DATE.
    read table OUT_tab index 1.
    MOVE LV_NEWDATE TO OUT_TAB-VALUE.
    CONDENSE OUT_TAB-VALUE.
    MODIFY OUT_TAB INDEX 1.
    ENDFORM.
    write the code below in ur sapscript,
    /:DEFINE &LV_NEWDATE&.
    /:PERFORM GET_NEWDATE IN PROGRAM TEST
    /:USING &LV_OLD_DATE&
    /:CHANGING &LV_NEWDATE&.
    PRINT &LV_NEWDATE&
    ENDPERFORM.

  • Date format in script format

    hi,
    how to change the date format in script form.
    thanks.

    try like this
    /: SET DATE MASK = 'Foster City, MM.DD.YY'
    &DATE& -> Foster City, 03.01.97
    &DATE(Z)& -> Foster City, 3.1.97
    /: SET DATE MASK = 'MMMM DD, YYYY'
    &DATE& -> March 01, 1997
    regards
    Prabhu

  • Time "and" Date Comparison

    Hi,
    I am trying to get the difference between two sets of time.
    This also involves a Date comparison because sometimes the times span more than one day.
    Here is an example of what I'm trying to accomplish. I have searched the forum archives but have not yet found time and date comparisons together.
    startRun = "10/26/01 4:30 PM";
    endRun = "10/27/01 7:45PM";
    I want to process these two times and get the difference.
    The result would be:
    totalRunTime = "27 hours 15 minutes";
    I am stumped. Is this type of process even possible? Any help would be grealty appreciated.
    Best,
    Christian Velez
    Senior Software Engineer
    Research Institute of America, Inc.
    [email protected]

    try this ...
            String startRun = "10/26/01 4:30PM";
            String endRun = "10/27/01 7:45PM";
            SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy hh:mma");
            try {
                Date startDate = sdf.parse(startRun);
                Date endDate = sdf.parse(endRun);
                System.out.println("Start date/time = " + startDate);
                System.out.println("End   date/time = " + endDate);
                long differenceInMillis = endDate.getTime() - startDate.getTime();
                long differenceInSecs = differenceInMillis / (1000);
                long differenceInMins = differenceInMillis / (1000 * 60);
                long differenceInHours = differenceInMillis / (1000 * 60 * 60);
                System.out.println("Millis = " + differenceInMillis);
                System.out.println("Seconds = " + differenceInSecs);
                System.out.println("Minutes = " + differenceInMins);
                System.out.println("Hours   = " + differenceInHours);
                //What you want
                System.out.println("Total run time = "
                    + differenceInHours + " hours "
                    + (differenceInMins % 60) + " minutes");
            } catch (ParseException pe) {
            }

  • OBIEE Date Comparison report with multiple measures

    Hello everyone...
    I have a requirement where I need to create a date comparison report (Current Month vs. Prior Month vs Prior Month Year Ago vs YTD vs Prior YTD vs Rolling 3 months, etc) with multiple Measures (Quote count, Quote offered count, New Business count, etc). I am to generate this report in this fashion:
    Quotes Current Month vs PM vs YoY Prior
    Month Current Month Prior Year Current
    YTD vs PM Prior
    YTD Rolling 3 Months vs PM Prior Rolling 3 Months
    Issued 120 120 123 1400 1020 1700 1580
    Unique Risks
    Offered 556 449 571 5881 6220 6101 5892
    Unique Risk Close Ratio
    Offered Close Ratio 21.6% 26.7% 21.5% 23.8% 16.4% 27.9% 26.8%
    Bitmap
    Avg Issued Premium 240 238 222 2801 2630 3104 2892
    Avg Offered Premium
    New Business
    Count
    Avg Full Term Premium
    I understand that time series is an option, and have created the time series (which show up as measures).
    My problem is:
    when creating the report (even as a pivot table) , OBIEE is not allowing me to drag the measure to rows, nor is it allowing me to drag the time series to columns. Also, I need to do conditional formating on some of the columns showing an up arrow for increased vs. prior month and down arrow for decreased vs. prior month.
    Does anyone have a solution for this issue? Any assistance would be greatly appreciated...
    Please advise and thanks!!!

    Jason,
        You've been very helpful, but I guess I'm just not explaining myself that well. The Credit Memo's throw things off because they do not contain a "Paid Date" value. That field in the record is blank. Since it is blank the report query ignores them. Therefore when the report query returns all records that have a "Paid date" range of "x to y" they are never returned. This is a problem whenever a credit memo exists for an invoice because the "invoice total" never changes. So when a customer pays on their account for a particular invoice, they only pay what is due which is the "invoice total" minus any "credit" from the "Credit Memo". So when my A/R person receives payment they are showing the invoice paid in full because MAS automatically includes all invoices and credit memo's. My report does not because there is no data in the "Paid Date" field of the record for Credit Memos.
    I've been doing alot research in trying to resolve this "exception" to my report. I think I may be on to something, but my knowledge of arrays is extremely limited. My resolution involves populating an array with the "invoice numbers" that are returned from the initial query from the supplied date range. Then using the "invoice numbers" from the array have it then populate my details section of the report with all of "invoice records" both the actual invoice record and any "credit memo" records. I can then group the records returned  based upon the "invoice number". then within that grouping I can performing my calculations to show whether or not the invoice has been paid in full. What do you think?  I've been able to populate an array with the invoice numbers based upon my date search range, but I have yet to figure out how to take that information and perform another lookup to pull in the rest of the data I need. Do you have any ideas?
    Thanks.  Bill

  • How to manipulate the date in idoc scripting?

    how can we manipulate date in idoc scripting? How to retrieve the year, month, date from the date? How can we update the year of the particular date in idoc scripting.

    There are a bunch of date / time functions that you can find in chapter 5 of the Idoc Script Reference (the bible for this sort of thing)
    For the sort of things you need to do I would recommend you look at formatDateWithPattern()
    for example to retrieve the year of 'now'
    <$year = formatDateWithPattern(dateCurrent(),"yyyy")$>
    month
    <$month = formatDateWithPattern(dateCurrent(),"MMM")$>
    the patterns for the same rules as Java date formats (unsurprisingly)
    If you want to update the year then I think you need to build the date as a string and the use the parseDate or parseDateWithPattern functions to actually create something that Idoc will recognise as a date object.
    Tim

  • Data comparisons and movements

    I have a Heap Sort using the following code, and I cannot seem to figure out how many data comparisons and data movements there are as the heap is sorted. Does anybody know how to count the number of comparisons and movements?? Please let me know....much appreciated...Thanks :)
    import java.io.IOException;
    import java.util.*; // Calender Class for timing
    public class Heap {
    private MyNode[] heapArray;
    private int maxSize;
    private int currentSize; // number of items in array
    public Heap(int mx) {
    maxSize = mx;
    currentSize = 0;
    heapArray = new MyNode[maxSize];
    public MyNode remove()
    MyNode root = heapArray[0];
    heapArray[0] = heapArray[--currentSize];
    trickleDown(0);
    return root;
    public void trickleDown(int index) {
    int largerChild;
    MyNode top = heapArray[index];
    while (index < currentSize / 2)
    int leftChild = 2 * index + 1;
    int rightChild = leftChild + 1;
    // find larger child
    if (rightChild < currentSize
    heapArray[leftChild].getKey() < heapArray[rightChild]
    .getKey())
    largerChild = rightChild;
    else
    largerChild = leftChild;
    if (top.getKey() >= heapArray[largerChild].getKey())
    break;
    heapArray[index] = heapArray[largerChild];
    index = largerChild;
    heapArray[index] = top;
    public void displayHeap() {
    int nBlanks = 32;
    int itemsPerRow = 1;
    int column = 0;
    int currentIndex = 0;
    while (currentSize > 0)
    if (column == 0)
    for (int k = 0; k < nBlanks; k++)
    System.out.print(' ');
    System.out.print(heapArray[currentIndex].getKey());
    if (++currentIndex == currentSize) // done?
    break;
    if (++column == itemsPerRow) // end of row?
    nBlanks /= 2;
    itemsPerRow *= 2;
    column = 0;
    System.out.println();
    else
    for (int k = 0; k < nBlanks * 2 - 2; k++)
    System.out.print(' '); // interim blanks
    public void displayArray() {
    for (int j = 0; j < maxSize; j++)
    System.out.print(heapArray[j].getKey() + " ");
    System.out.println("");
    public void insertAt(int index, MyNode newNode) {
    heapArray[index] = newNode;
    public void incrementSize() {
    currentSize++;
    public static void main(String[] args) throws IOException {
    int size, i;
    size = 500;
    Heap theHeap = new Heap(size);
    for (i = 0; i < size; i++) {
    int random = (int) (java.lang.Math.random() * 5000);
    MyNode newNode = new MyNode(random);
    theHeap.insertAt(i, newNode);
    theHeap.incrementSize();
    System.out.println(size+" random numbers are currently being generated...");
    for (i = size / 2 - 1; i >= 0; i--)
    theHeap.trickleDown(i); // creates the heap
    System.out.print("\nRandom Numbers in a Heap: ");
    theHeap.displayArray(); // prints the heap
    long time1000start = new Date().getTime() ; // this makes a new Date object and then sets the long integer value of the Date object
    // ******************* START - sorting numbers *******************
    for (i = size - 1; i >= 0; i--)
    MyNode biggestNode = theHeap.remove();
    theHeap.insertAt(i, biggestNode);
    // ******************* END - sorting numbers *******************
    long time1000end = new Date().getTime() ; // this makes a new Date object and then sets the long integer value of the Date object
    double timediff1000m = (time1000end - time1000start); // difference of time in milliseconds
    double timediff1000s = ((time1000end - time1000start) / 1000); // difference of time in seconds
    System.out.print("\nRandom Numbers in a Sort: ");
    theHeap.displayArray(); // prints the numbers in increasing order
    System.out.print("\nStart Time of Sort: "+time1000start);
    System.out.print("\nEnd Time of Sort: "+time1000end);
    System.out.print("\nTime to Complete Sort: "+timediff1000m+" milliseconds or "+timediff1000s+" seconds.");
    } // end main method
    } // END project :)

    I never miss class....my instructor gave us the assignment of making a heap sort and he told us to use code off the internet as a resource because the only sorting we have done so far is bubble.....this was a research project, for my instructor to see if we can use the internet as an effective resource to put together a program and learn about a differnet type of sorting.....everyone in the class got a different type of sort (merge, quick, insertion, etc...). i have put the program together and customized it to my needs based on my knowledge.....the last thing i am having trouble with is my counting of comparisons and data movements. Can you please help me finish up my program.

  • Question on How to Use LI and NP Data Comparison Report

    Hi,
    We are trying to figure out how to make the Transaction Code PC00_M42_LLPD (LI and NP Data Comparison Report) work. What file type (.xls, .txt, etc) should be used?  Anyone who is familiar with the transaction, please help.
    Best Regards,
    Bry

    Somewhere in the Oracle 8.0 documentation it is stated that one
    enviroment per each thread is required if I want to ensure
    complete concurrency of different threads accessing databases.
    But isn't this a waste of resources since only Handle Alloc &
    Free functions use Enviroment handle, hence they should be
    mutexed for access from concurrent threads.
    But the most time-consuming functions are ServerAttach &
    SessionBegin which shouldn't be mutexed since they have each
    their own Server/Session handle.
    So my question is if a single OCI Enviroment is enough for the
    most demanding tasks or should I create one enviroment per
    thread?
    Most folks are happy with a single environment. The mutex on the
    env handle is only taken when the OCI library is allocating some
    memory for internal operations.
    Tomislav.

  • Aligning data in sap script

    hi guyz,
    how can i align data in sap script with spaces between..
    regards

    Hi,
    you have to create paragraph formats for this, in paragraph format you can define tab sapces.
    use that paragraph format in command box of ur window editor, where ever you want the space just use ',,'  which will apply tab space (the sapce you have declared).
    reward if useful,
    Thanks,
    Sreeram.

  • Exctract data from Post Script file

    Hi all;
    I need to extract, manipulate some data from post script file send them to database.
    How can i do that process?

    OT: Hey Rene, I see you've become a local celebrity
    around here!I'm still waiting for the groupies to show up, though. No luck so far. :p
    I think it's a nice initiative and
    enjoyed reading the interview.
    ; )Thanks. :)

  • Can we Save BQY without result set/data through dashboard script

    Hi All,
    Can we save a BQY without result set/data through dashboard script?
    Thanks,
    Soumitra

    Hi Soumitra,
    Its happy that you resolved it by yourself. But if you post your solution here then it will be helpful for everyone else looking for the same solution.
    Thanks,
    karthick

Maybe you are looking for

  • Pricing Procedure to be configured for calculating excise

    Hello , I have new pricing procedure to be configured for calculating excise on base value , the procedure is as under Base Price                              -                    X  Amount Surface transport                    -                Y  Amo

  • Packagemaker language problem

    Hi, I have created a installer for the application using PackageMaker. Installer provide support for different langauge. But during installation, i want to install a file based on the system language. How do i do it? How can i get the system langauge

  • Check Number in assignement field.

    HI When i post incoming and outgoing payment through FPCJ I am updating the check no in the field called CHECK. When i transfer these document to FICO through FPG1.. i am not receiving the cheque no in the assignement field. If i am getting the check

  • Doesnt seem to connect when published in a browser

    Hey friends.. im a total newbie to Flash Media server.. i just started using this for the past 2 days..so, heres the problem im facing..i ve a simpleConnect component and a connectionlight component on my stage and i connect both of em..the connectio

  • 1060 vs.. 720 16:9

    I have a 1080p tv, why do I have to set it up in 1080i everytime I turn on the cable box?  It is defaultsback  to 720p, and does not keep the 1080 setting the next time I turn it on.  How do I get it to keep the default to 1080 without having to do i