How to get elapsed time from start of current day

Hello,
I've tried to use the DateDiff function to calculate the elapsed time, starting from 00:00:00:000 (Midnight of current day), but I'm getting hung up on how to inform the function of what date values it should use.  I could parse off the time section
of the
GetDate() function, but that doesn't seems a little klunky to me. 
So, what I'm trying to capture is this (pseudo code): 
Elapsed Time (int) =    Select DateDiff(seconds, Current Day.Midnight, CurrentDay.CurrentSecond)
Any help is greatly appreciated.
Cap

Hello,
So something like this? You can change it around, I used variables so you can see and check (and play with) the values.
DECLARE @CurDay DATE = GETDATE()
Declare @SecondsToDate INT
SELECT @SecondsToDate = DATEDIFF(SECOND, @CurDay, GETDATE())
SELECT @SecondsToDate AS SecondsPastMidnight
-- do the check
SELECT DATEADD(SECOND, @SecondsToDate, CAST(@CurDay AS DATETIME))
Sean Gallardy | Blog | Microsoft Certified Master

Similar Messages

  • How to get a time from a NTP server in ActionScript 3 ?

    Dear All,
    I need your advice, how to get the time from NTP Server , I tried to do this, but I don't.
    Thanks
    Omar Mahmoud

    you must use a server-side language supported by your server.  php is a commonly supported language on most servers.
    php tutorials can be found via google or any other search engine.

  • How to get elapsed time in case struture?

    I'm trying to get Elapsed Time VI to work but couldn't figure out how to use it properly.
    I have a subVI with state machine structure to decode data stream from serial port.
    State1 uses VISA read to read a byte and check if it is the Start of Frame. If TRUE, goes to State2. If FALSE, loop back to State1 and try again.
    If the State1 keeps getting FALSE for certain time (e.g. 5 seconds), stop the subVI and insert custom error code.
    So I have to calculate the elapsed time since State1 starts to be FALSE and keeps to be FALSE.
    I tried to use Elapsed Time VI but have problem of understanding it well.
    Is there any other better solution than using Elapsed Time VI? Also, how long is the execution time of Elapsed Time VI?
    Any suggestion will be very much appreciated.

    Hi,
    The Boolean output (Time Elapsed) in Elapse Time VI should give True when time got elapsed.
    Else we can simulate using "Tick Count (ms)", which counts the ticks in milisecond. You can move on to state 2 when count reaches to reauired duration.
    We can give you better idea if you post the code VI.
    Regards
    Haneef

  • How to get system time from cRIO?

    Hello,
    I have an NI cRIO-9076 chassis with an NI-9467 GPS module and an NI-9234 module.
    I've downloaded the FPGA Timekeeper application which synchronises the FPGA clock to the 1PPS GPS, this works well.  What I want to do is create a trigger that at a pre-defined HH:MMS the system will start to acquire and log data from the Accelerometers connected to the NI-9234 module.
    I have added the controls for the entry of the HH:MMS and calculated the time in seconds.  I would like to compare the system clock once it is locked to the entered timestamp and then trigger.
    As I only have a value that represents seconds in the day I need to calculate the offset from EPOCH to compare against the GPS time reference.  I have read that the NI system clock runs from 01/01/1904 instead of the EPOCH 01/01/1970.
    The question is how do I get the current system time so that I can compare it against the entered time?  I only need seconds in the day = (HH * 3600) + (MM * 60) + (SS)
    Thank you,
    Kind Regards,
    Simon

    You should use the Get Date/Time in Seconds VI which will return a timestamp. You can then format this timestamp using the Format Date/Time String to give you exactly the time format that you need. Then you can extract the numbers you need and do your math.
    www.movimed.com - Custom Imaging Solutions
    Attachments:
    Get Seconds in Day.vi ‏9 KB

  • How to get elapsed time of the query in form 6i

    hi
    I used to use " set timing on " in sql to get the elapsed time
    set timing on
    elapsed time :XX:XX:XX ,
    but i dont know how to get it in fom
    its really imporant to measure the time elapsed for me cuz i am student an need to get the time
    thanx alot

    regarding to point 1 : u know there are three modes for system ; query, enter_qeury,and normal. when the system is not noraml so it is either query or enter_query , and both are query processing ( as i think) so it the elapsed time . it also by using timer stpos when system finish query ( normal)
    why you dont prefer timers ..... ( it important please to explain )
    thank you very much Navnit Punj
    Edited by: user8652693 on 22/07/2009 07:33 ص

  • V$osstat and V$SYS_TIME_MODEL - how to get CPU time from instance

    Hi there !
    I have a function osstat, which take stats from the os using v$osstat (credits for the procedure to a person, I regret to say, that I cant remember his name). But since we have 9 databases on the same server (and we dont have access to the server os itself (outsourcing stinks), we often would like to know more about cpu, waits etc. And one of the procedures we use is the osstat.
    I have tried to combine it with V$SYS_TIME_MODEL in oder to se how much of the OS CPU time comes from the instance I am on at the moment, but I'm not able to figure out how to do it exaclty.
    This is my code:
    DROP TYPE OSSTAT_RECORD;
    CREATE OR REPLACE TYPE osstat_record IS OBJECT (
      date_time_from TIMESTAMP,
      date_time_to TIMESTAMP,
      idle_time NUMBER,
      user_time NUMBER,
      sys_time NUMBER,
      iowait_time NUMBER,
      nice_time NUMBER,
      instance_cpu_time NUMBER
    DROP TYPE OSSTAT_TABLE;
    CREATE OR REPLACE TYPE osstat_table AS TABLE OF osstat_record;
    CREATE OR REPLACE FUNCTION osstat(p_interval IN NUMBER default 5, p_count IN NUMBER default 2, p_dec in number default 0)
       RETURN osstat_table
       PIPELINED
    IS
      l_t1 osstat_record;
      l_t2 osstat_record;
      l_out osstat_record;
      l_num_cpus NUMBER;
      l_total NUMBER;
      l_instance NUMBER;
    BEGIN
      l_t1 := osstat_record(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
      l_t2 := osstat_record(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
      SELECT value
      INTO l_num_cpus
      FROM v$osstat
      WHERE stat_name = 'NUM_CPUS';
      FOR i IN 1..p_count+1
      LOOP
        SELECT systimestamp, sum(decode(stat_name,'IDLE_TIME', value, NULL)) as idle_time,
               sum(decode(stat_name,'USER_TIME', value, NULL)) as user_time,
               sum(decode(stat_name,'SYS_TIME', value, NULL)) as sys_time,
               sum(decode(stat_name,'IOWAIT_TIME', value, NULL)) as iowait_time,
               sum(decode(stat_name,'NICE_TIME', value, NULL)) as nice_time
        INTO l_t2.date_time_to, l_t2.idle_time, l_t2.user_time, l_t2.sys_time, l_t2.iowait_time, l_t2.nice_time
        FROM v$osstat
        WHERE stat_name in ('IDLE_TIME','USER_TIME','SYS_TIME','IOWAIT_TIME','NICE_TIME');
        select value/100000
        into l_t2.instance_cpu_time
        from  V$SYS_TIME_MODEL
        where stat_name = 'DB time';
        l_out := osstat_record(l_t1.date_time_from, systimestamp,
                               (l_t2.idle_time-l_t1.idle_time)/l_num_cpus/p_interval,
                               (l_t2.user_time-l_t1.user_time)/l_num_cpus/p_interval,
                               (l_t2.sys_time-l_t1.sys_time)/l_num_cpus/p_interval,
                               (l_t2.iowait_time-l_t1.iowait_time)/l_num_cpus/p_interval,
                               (l_t2.nice_time-l_t1.nice_time)/l_num_cpus/p_interval,
                               ((l_t2.instance_cpu_time-l_t1.instance_cpu_time)/100));  --- >>  Should I divide by no of cpus here as well???  Or ???
        l_total := l_out.idle_time+l_out.user_time+l_out.sys_time+l_out.iowait_time+nvl(l_out.nice_time,0);
        if l_out.user_time > 0 then
           l_instance := (l_out.instance_cpu_time*100)/l_total;   ->> instance in percent of the total cputime
        else
           l_instance := 0;
        end if;
        if i > 1 then
        PIPE ROW(osstat_record(l_t1.date_time_to, systimestamp,
                               trunc((l_out.idle_time/l_total*100),p_dec),
                               trunc((l_out.user_time/l_total*100),p_dec),
                               trunc((l_out.sys_time/l_total*100),p_dec),
                               trunc((l_out.iowait_time/l_total*100),p_dec),
                               trunc((l_out.nice_time/l_total*100),p_dec),
                               trunc(l_instance,p_dec)));
        end if;
        l_t1 := l_t2;
        sys.dbms_lock.sleep(p_interval);
      END LOOP;
      RETURN;
    END;
    /I get ie a USER CPU Time of 15% fo a given interval of 5 mins - and a cputime for the instance of 50 - and others are 5% and 1%.
    My brain has stopped working now .... I'm stuck
    Mette

    mettemusens wrote:
    Hi there !Duplicate thread:
    Re: v$osstat and V$SYS_TIME_MODEL question
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • How to get elapsed time?

    I am writting in c++ and i want to know how much time has elapsed while executing some part of code. In windows I would use GetTickCount() like this:
    time=GetTickCount();
    //some code
    time=GetTickCount()-time;
    printf("Time elapsed: %d",time);
    What function can I use in linux? The function doesn't have to be portable but it must have at least millisecond resolution.

    thx! even better than I needed .

  • How to get a time part from Date datatype

    Hi,
    I would like to know how to extract the timestamp alone from DATE datatype? If my input is '27-SEP-2011 23:59:00' I need the output as 23:59:00. I am surprised to see that there are no in-built functions for this or may be I am wrong. Basically I need to remove the date part from DATE data type and get the time.Please assist.
    -Thanks
    Edited by: user9546145 on Sep 27, 2011 2:24 PM
    Edited by: user9546145 on Sep 27, 2011 2:25 PM

    Hi,
    user9546145 wrote:
    Hi,
    I would like to know how to extract the timestamp alone from DATE datatype? Be careful! In Oracle, TIMESTAMP means a datatype, similar to but distinct from DATE. You'll avoid confusion if you don't use the word "timestamp" to mean anything else.
    There is a built-in function, TO_CHAR:
    TO_CHAR (dt_col, 'HH24:MI:SS')Depending on how you plan to use the time, TRUNC is another handy built-in function:
    dt_col - TRUNC (dt_col)is a NUMBER (not less than 0, but less than 1) which is suitable for many tasks, such as finding the average time.
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using.

  • How to get a formula from the user from a text box in a webpage

    Hi. I would like to know how to get the formula from the user who enters in a textbox. This formula can have any number of variables starting with a and goes on.
    The complexity of the formula can go upto sin, cos, ln, exp. Also user enters the minimum and maximum values of these variables. Based on a specific algorithm (which I use) I would calculate a *set of values, say 10, for each of these variables, substitute in the formula and based on the result of this formula, I select ONE suitable  value for each of the variables.
    I don't know how to get this formula (which most likely to be different each time) and substitute the values *which I found earlier.
    Kindly help me out in this issue.
    Thanks

    The textbox is the easy part. It's no different than getting a String parameter out of an HTTP request.
    The hard part is parsing the String into a "formula" for evaluation. You'll have to write a parser or find one.
    Google for "Java math expression parser" and see what you get.
    Or write your own with JavaCC.
    %

  • How do I stop iTunes from starting up in the other active Windows sessions?

    I have multiple (3) user accounts on a windows (Vista) computer. When I start iTunes from one account iTunes wants to also start up on each of the active windows accounts and continues to attempt to start iTunes after some time period (90 seconds?).
    I get a error screen on the attempts for the User that should not be starting iTunes that reads:
    You cannot open the application "iTunes" because another user has it open.
    Ask the other user to quit the application, then try again.
    I want iTunes to run within only one account. How do I stop iTunes from starting up in the other active accounts?

    Connect iPhone - iTunes will launch
    select iPhone in iTunes' left column
    in iTunes' main window untick "Automatically sync ..."

  • How to calculate elapsed time based on user input

    I'm not sure what to do next in this program. Basically, I'm not sure exactly how to get the time to output accurately, as in what forumla I should be using.
    This is the question:
    What comes 13 hours after 4 o'clock? Create an ElaspedTimeCalculator application that prompts the user for a starting hour, whether it is am or pm, and the number of elapsed hours. The application then displays the time after that many hours have passed. Application output should look similar to:
    Enter the starting hour: 7
    Enter am or pm: pm
    Enter the number of elapsed hours: 10
    The time is: 5:00 amHere's the code I have so far:
    import java.util.Scanner;
    public class ElapsedTimeCalculator
         public static void main(String[] args)
              int starting_hour;
              int starting_minutes; /*This is added in case the user wants to add minutes as well.*/
              String am_or_pm;
              int elapsed_hours;
              int elasped_minutes;
              int time_hours;
              int time_minutes;
              System.out.println("Welcome. This application will give you the time based on your input.");
              System.out.println(" ");
              Scanner input = new Scanner(System.in);
              System.out.print("Enter the starting hour: ");
              starting_hour = input.nextDouble();
              System.out.print("Enter the starting minutes: ");
              starting_minutes = input.nextDouble();
              System.out.print("Enter either 'am' or pm': ");
              am_or_pm = input.nextString();
              System.out.print("Enter the number of elapsed hours: ");
              elapsed_hours = input.nextDouble();
              input.close();
              time_hours =
              time_minutes = 
              if(am_or_pm = "am" || am_or_pm = "a.m." || am_or_pm = "AM" || am_or_pm = "A.M.")
                   System.out.println("The time is " + time_hours + ":" + time_minutes + "am");
              if(am_or_pm = "pm" || am_or_pm = "p.m." || am_or_pm = "PM" || am_or_pm = "P.M.")
                   System.out.println("The time is " + time_hours + ":" + time_minutes + "pm");
    }To calculate time_hours should I just calculate this by adding the elapsed hour to the starting hour? I doubt it will be accurate for all situations.
    Same for the time_minutes For example, if the starting minutes and the elapsed minutes were 50, it would be greater than 60. Also, not sure if it makes sense to separate hours and minutes like this, it's not required to in the question. I initally thought it would be easier to approach like this instead of allowing the user to input a double for the starting hour. ex. 5.7
    I get the feeling that this is extremely simple, but nonetheless, I'm stuck, so any help would be appreciated.

    Well thanks to both of you. I did a little reading up on the modulus operator and coupled it with some logic (although, truthfully, I'm not really using to there actually being an application for the remainder of a division operation, since it's never really used very much in any of my Math courses) and the hours portion works perfectly now:
    import java.util.Scanner;
    public class ElapsedTimeCalculator
         public static void main(String[] args)
              int starting_hour;
              //int starting_minutes; /*This is added in case the user wants to add minutes as well.*/
              String am_or_pm;
              int elapsed_hours;
              //int elasped_minutes;
              System.out.println("Welcome. This application will give you the time based on your input.");
              System.out.println(" ");
              Scanner input = new Scanner(System.in);
              System.out.print("Enter the starting hour: ");
              starting_hour = input.nextInt();
              //System.out.print("Enter the starting minutes: ");
              //starting_minutes = input.nextInt();
              System.out.print("Enter either 'am' or pm': ");
              am_or_pm = input.next();
              System.out.print("Enter the number of elapsed hours: ");
              elapsed_hours = input.nextInt();
              input.close();
              int time_hours = 0;
              //int time_minutes;
              String meridien;
              if(am_or_pm.equals("am"))
                   time_hours = (starting_hour + elapsed_hours) % 24;
                   //time_minutes = (starting_minutes + elapsed_minutes) % 60;
              else if(am_or_pm.equals("am"))
                   time_hours = (starting_hour + elapsed_hours) % 24;
                   //time_minutes = (starting_minutes + elapsed_minutes) % 60;
              else if(am_or_pm.equals("AM"))
                   time_hours = (starting_hour + elapsed_hours) % 24;
                   //time_minutes = (starting_minutes + elapsed_minutes) % 60;
              else if(am_or_pm.equals("A.M."))
                   time_hours = (starting_hour + elapsed_hours) % 24;
                   //time_minutes = (starting_minutes + elapsed_minutes) % 60;
              else if(am_or_pm.equals("pm"))
                   time_hours = (starting_hour + elapsed_hours + 12) % 24;
                   //time_minutes = (starting_minutes + elapsed_minutes) % 60;
              else if(am_or_pm.equals("p.m."))
                   time_hours = (starting_hour + elapsed_hours + 12) % 24;
                   //time_minutes = (starting_minutes + elapsed_minutes) % 60;
              else if(am_or_pm.equals("PM"))
                   time_hours = (starting_hour + elapsed_hours + 12) % 24;
                   //time_minutes = (starting_minutes + elapsed_minutes) % 60;
              else if(am_or_pm.equals("P.M."))
                   time_hours = (starting_hour + elapsed_hours + 12) % 24;
                   //time_minutes = (starting_minutes + elapsed_minutes) % 60;
              if(time_hours < 12)
                   meridien = "A.M.";
                   System.out.println("The time is: " + time_hours + ":00 " + meridien);
              else if(time_hours > 12)
                   meridien = "P.M.";
                   System.out.println("The time is: " + time_hours + ":00 " + meridien);
    }Now the only thing is the minutes. My teacher did say she wants the user to have the option to input minutes also if he/she desires, so I do need it. However, the only problem is that if say the user inputs a "starting minute" of 14 for example, and 66 minutes elapsing, then (14 + 66) int/ 60 = 1r20 but using the modulus operator would only give me 20. So how will I be able to add any extra hours if it is necessary?

  • How to get missing songs from old phone

    Hello all,
    I recently broke my iphone and I just received a new one in the mail the other day.  I created a backup in itunes and used that backup to restore my new phone. However, when my new phone was finished restoring I was missing about 1000 songs.  Without starting over what is the best way to get the missing music from my old phone to the new one?  Can I load itunes on another computer and then sync my music from my old phone and then just copy the library to itunes on my main computer? Thanks for any help.

    Hi HelpPleaseMan,
    >>How to get a photo from windows phone 8 programmatically and how to save that photo into my phone.
    In Windows Phone 8 we can use the
    PhotoChooserTask to enable users to select an existing photo from the phone.
    For more information, please try to refer to:
    #How to use the photo chooser task for Windows Phone 8:
    https://msdn.microsoft.com/en-us/library/windows/apps/hh394019(v=vs.105).aspx .
    Besides, we can also use the
    CameraCaptureTask to enable users to take a photo from your application using the built-in Camera application. If the user completes the task, an event is raised and the event handler receives a photo in the result. On Windows Phone 8, if the user accepts
    a photo taken with the camera capture task, the photo is automatically saved to the phone’s camera roll.
    For more information, please try to refer to:
    #How to use the camera capture task for Windows Phone 8:
    https://msdn.microsoft.com/library/windows/apps/hh394006(v=vs.105).aspx .
    Best Regards,
    Amy Peng
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to get each value from a parameter passed like this '(25,23,35,1)'

    Hi
    One of the parameter passed to the function is
    FUNCTION f_main_facility(pi_flag_codes VARCHAR2) return gc_result_set AS
    pi_flag_codes will be passed a value in this way '(25,23,35,1)'
    How to get each value from the string
    like 25 first time
    23 second time
    35 third time
    1 fourth time
    I need to build a select query with each value as shown below:-
    (SELECT t2.org_id, t4.description
    from org_name t2, ref_org_name t3, code_table t4
    where t2.att_data = t4.code
    and t3.ref_code = t2.att_type
    and t2.att_type = 25 and t3.code_type = t4.code_type
    and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date) q1,
    (SELECT t2.org_id, t4.description
    from org_name t2, ref_org_name t3,code_table t4
    where t2.att_data = t4.code
    and t3.ref_code = t2.att_type
    and t2.att_type = 23 and t3.code_type = t4.code_type
    and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date) q2,
    (SELECT t2.org_id, RTRIM(xmlagg(xmlelement(e, t4.description || ';')
    ORDER BY t4.description).EXTRACT('//text()'), ';') AS DESCRIPTION
    from org_name t2, ref_org_name t3,code_table t4
    where t2.att_data = t4.code
    and t3.ref_code = t2.att_type
    and t2.att_type = 35 and t3.code_type = t4.code_type
    and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date
    group by t2.org_id) q3,
    (SELECT t2.org_id, t4.description
    from org_name t2, ref_org_name t3, code_table t4
    where t2.att_data = t4.code
    and t3.ref_code = t2.att_type
    and t2.att_type = 1 and t3.code_type = t4.code_type
    and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date) q4
    Please help me with extracting each alue from the parm '(25,23,35,1)' for the above purpose. Thank You.

    chris227 wrote:
    I would propose the usage of regexp for readibiliy purposes and only in the case if this doesnt perform well, look at solutions using substr etc.
    select
    regexp_substr( '(25,23,35,1)', '\d+', 1, 1) s1
    ,regexp_substr( '(25,23,35,1)', '\d+', 1, 2) s2
    ,regexp_substr( '(25,23,35,1)', '\d+', 1, 3) s3
    ,regexp_substr( '(25,23,35,1)', '\d+', 1, 4) s4
    from dual 
    S1     S2     S3     S4
    "25"     "23"     "35"     "1"In pl/sql you do something like l_val:= regexp_substr( '(25,23,35,1)', '\d+', 1, 1);
    If t2.att_type is type of number you will do:
    t2.att_type= to_number(regexp_substr( '(25,23,35,1)', '\d+', 1, 1))Edited by: chris227 on 01.03.2013 08:00Sir,
    I am using oracle 10g.
    In the process of getting each number from the parm '(25,23,35,1)' , I also need the position of the number
    say 25 is at 1 position.
    23 is at 2
    35 is at 3
    1 is at 4.
    the reason I need that is when I build seperate select for each value, I need to add the query number at the end of the select query.
    Please see the code I wrote for it, But the select query is having error:-
    BEGIN
    IF(pi_flag_codes IS NOT NULL) THEN
    SELECT length(V_CNT) - length(replace(V_CNT,',','')) FROM+ ----> the compiler gives an error for this select query : PLS-00428:
    *(SELECT '(25,23,35,1)' V_CNT  FROM dual);*
    DBMS_OUTPUT.PUT_LINE(V_CNT);
    -- V_CNT := 3;
    FOR L_CNT IN 0..V_CNT LOOP
    if L_CNT=0 then
    V_S_POS:=1;
    V_E_POS:=instr(pi_flag_codes, ',', 1, 1)-1;
    else
    V_S_POS:=instr(pi_flag_codes,',',1,L_CNT)+1;
    V_E_POS:=instr(pi_flag_codes, ',', 1, L_CNT+1)-V_S_POS;
    end if;
    if L_CNT=V_CNT then
    V_ID:=TO_NUMBER(substr(pi_flag_codes,V_S_POS));
    else
    V_ID:=TO_NUMBER(substr(pi_flag_codes,V_S_POS,V_E_POS));
    end if;
    VN_ATYPE := ' t2.att_type = ' || V_ID;
    rec_count := rec_count +1;
    query_no := 'Q' || rec_count;
    Pls help me with fetching each value to build the where cond of the select query along with the query number.
    Thank You.

  • How to get real value from selectOneChoice with javascript?

    Hi,
    How to get real value from selectOneChoice with javascript? The event.getNewValue() only gets me the index of the selected item, not the value/title.
    JSF page:
    <af:resource type="javascript">
    function parseAddress(event)
    alert("new value: " + event.getNewValue());
    </af:resource>
    <af:selectOneChoice label="Location:" value="" id="soc4">
    <af:clientListener type="valueChange" method="parseAddress" />
    <f:selectItems value="#{Person.locations}" id="si7"/>
    </af:selectOneChoice>
    HTML :
    <option title="225 Broadway, New York, NY-10007" selected="" value="0">225 Broadway (Central Office)</option>
    <option title="90 Mark St., New York, NY-10007" value="1">90 Mark St. (Central Office)</option>
    Thanks a lot.

    Something I was missing ,
    You need to add valuePassThru="true" in your <af:selectOneChoice component. I have personally tested it and got the actual value in alert box. I hope this time you got the real solution. You can also test the following code by your end.
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1">
    <af:form id="f1">
    <af:panelBox text="PanelBox1" id="pb1">
    <af:selectOneChoice label="Set Log Level" id="soc1"
    value="#{SelectManagedBean.loggerDefault}"
    valuePassThru="true">
    <af:selectItem label="select one" value="First" id="s6"/>
    <af:selectItem label="select two" value="Second" id="s56"/>
    <af:clientListener method="setLogLevel" type="valueChange"/>
    </af:selectOneChoice>
    <af:resource type="javascript">
    function setLogLevel(evt) {
    var selectOneChoice = evt.getSource();
    var logLevel = selectOneChoice.getSubmittedValue();
    // var logLevelObject = AdfLogger.NONE;
    alert("new value is : " + logLevel);
    //alert(evt.getSelection);
    //alert(logLevelObject);
    evt.cancel();
    </af:resource>
    </af:panelBox>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>

  • How to get maximal value from the data/class for show in Map legend

    I make WAD report that using Map Web Item.
    I devide to four (4) classes for legend (Generate_Breaks).
    I want to change default value for the class by javascript and for this,
    I need to get maximal value from the class.
    How to get maximal value from the data/class.
    please give me solution for my problem.
    Many Thx
    Eddy Utomo

    use this to get the following End_date
    <?following-sibling::../END_DATE?>
    Try this
    <?for-each:/ROOT/ROW?>
    ==================
    Current StartDate <?START_DATE?>
    Current End Date <?END_DATE?>
    Next Start Date <?following-sibling::ROW/END_DATE?>
    Previous End Date <?preceding-sibling::ROW[1]/END_DATE?>
    ================
    <?end for-each?>
    o/p
    ==================
    Current StartDate 01-01-1980
    Current End Date 01-01-1988
    Next Start Date 01-01-1990
    Previous End Date
    ================
    ==================
    Current StartDate 01-01-1988
    Current End Date 01-01-1990
    Next Start Date 01-01-2005
    Previous End Date 01-01-1988
    ================
    ==================
    Current StartDate 01-01-2000
    Current End Date 01-01-2005
    Next Start Date
    Previous End Date 01

Maybe you are looking for

  • How to use relative DSN filename for connection (in Design mode)

    Hello, I connect Crystal Reports to Oracle database via ODBC with connection information stored in DSN file. I use "Crystal Reports Basic" in Visual Studio 2008 SP1. CR has no SP. Windows XP Pro SP3, my development machine. I created a DSN file, and

  • Extended desktop

    I am running an Imac G5 that I just had repaired. Before the repair i was able to do an extended desktop. Now I am not able to. Support says that the my version will only do mirroring and that maybe the previous user had DLed someting that would do e

  • Message Exception and Internet Address exception in Java mail API

    Hi, Using JAVA mail api while using sendmessage method i am getting Invalid address exception..TO address and from address are same as my mail id..Someone please tell why these exceptions come. Thanks..

  • Installation EHP 4 on SAP ERP 6.0

    Hi, I'm doing the installation of a new ERP 6.0 and I'm trying to install Ehp 4 on it, but I get errors during install. The OS is Windows 2003 and DB is MSSQL 2008 SP1. I'm using the latest EHPI 7.00 installer (patchlevel 77). The ERP 6.0 installatio

  • My iPhone turns off and reinitiate when i'm playing a game. is this normal?

    My iPhone turns off and reinitiate when i'm playing a game. is this normal?