Time diffence calculation

hi
im Reading time in 2 edit box
i want calculate time difference based on 2 edit box

Hi Harish.....
Try this sample code for timediff......
select datediff(minute,'11:30','12:15')
and if you create one udf for time and you want to difference between doctime and udf time try this...
select T0.docentry,T0.docnum,
datediff(minute,
(select case when len(T0.udftime)=3 then
convert (datetime,convert(varchar,( convert(varchar,T0.docdate,103) + ' '+ (left(T0.udftime,1)) + ':'+ (right(T0.udftime,2))) ,114),103) else
convert (datetime,convert(varchar,( convert(varchar,T0.docdate,103) + ' '+ (left(T0.udftime,2)) + ':'+ (right(T0.udftime,2))) ,114),103) end),
(select case when len(T0.doctime)=3 then
convert (datetime,convert(varchar,( convert(varchar,T0.docdate,103) + ' '+ (left(T0.doctime,1)) + ':'+ (right(T0.doctime,2))) ,114),103) else
convert (datetime,convert(varchar,( convert(varchar,T0.docdate,103) + ' '+ (left(T0.doctime,2)) + ':'+ (right(T0.doctime,2))) ,114),103) end) )
from ordr T0
Hope you can modify and create your code.....
Regards,
Rahul

Similar Messages

  • Warning "Time of Calculation 'Before Aggregation' is obsolete" in BI 7.0

    Hi Friends,
    We have recently upgraded our BW system from BW 3.1 to BI 7.0. While executing one of the query in BI 7.0 i am getting the Warning Message "Time of Calculation 'Before Aggregation' is obsolete". I can run the query by ignoring the message and get the results. But I am not getting the correct result for some of the calculated key figures which has setting for Time of calculation as "Before Aggregation".
    After doing some research i found that before aggregation is not allowed in BI 7.0. We are using queries created in 3.x environment. There is some work around which talks about creating new calculated key figure with after aggregation setting and all. But in my case it not feasible as there are so many queries based on those calculated key figures.
    Does any one had the similar situation? Is there any other way to correct this problem?
    I would appreciate your help in this regards.
    Thanks,
    Manmit

    Hi
    Try SAP notes 935903.
    Symptom
    Calculated Key Figures "Existance Indicator" with aggregation behaviour "Before Aggregation" will get now with NW 2004s warning popup "Time of calculation 'Before Aggregation' is obsolete" during execution.
    this may be helpful.
    Also Check the below thread
    /message/2986338#2986338 [original link is broken]
    Regards
    Shilpa
    Edited by: Shilpa Vinayak on Oct 10, 2008 4:23 AM

  • Date and time diffrence calculations

    Dear Experts,
    I have a doubt regarding the date and time diffrence calculation please help me out.
    This is regarding the report called u201CVehicle tracking systemu201D. The purpose of this report is to give the user information like how many vehicles have come in and how much time each vehicle has parked in the filling in the refinery and also the average time taken for a customer.
    For this we have created 4 info objects called
    1)     Park In Time
    2)     Park In Date
    3)     Gate Out Time
    4)     Gate Out Date
    We have created a routine which calculate the difference in Vehicle Park In Date & Time to Gate Out Time and Date
    The Time difference is number format.
    Example: For Vehicle1
    Park in Date and Park in Time are         27.11.2008 and 17:43:35
    Gate out Date and Gate out Time are     29.11.2008 and 09:36:16            
    Here routine will calculate the difference in the above date and time and the output is like this     1,155.138,000 (i.e. 1day, 15 hours 51 mins and 38 seconds) that means the vehicle has parked for 1 day and 15 hours etc.
    But we require the output like    1 day, 15:51:38
    Please give us the solution how to go about it.
    Thanks in advance,
    venkat

    Hi,
    I think in regard to your problem, the solution will be to make the variables in the query runtime by the replacement path variable.
    Please find the below link, its very much self explanatory and in regard to your problem.
    Hope it helps!
    [http://sd-solutions.com/documents/SDS_BW_Replacement%20Path%20Variables.html]
    Regards,
    Neha.

  • How to calculate any two date with diffence calculation by using obiee11g?

    Hi,
    i have a requirement like,
    location wise current month and previous month with movement calculation,can to tell me how to calculate any two date with diffence calculation
    by using obiee11g
    Note,
    I tried to implemented ago function as well as dynamic two dates calculation using $2-$1 methods..but i am getting the o/p it's self i am getiing some null value also that' why it's not tallying with our actual report.
    i tired to used ifnull(mesaurecolumn,0) also case condition on the mesaure colution still it's not tallying.
    THanks and Rds,
    Devarasu.R

    Hi,
    for Date Difference........
    TimestampDiff(interval, timestamp1, timestamp2)
    ex:TimestampDiff(SQL_TSI_DAY, cast('1-apr-2011' as date), current_date)
    Where:
    interval
    The specified interval. Valid values are: SQL_TSI_SECOND, SQL_TSI_MINUTE, SQL_TSI_HOUR, SQL_TSI_DAY,
    SQL_TSI_WEEK, SQL_TSI_MONTH, SQL_TSI_QUARTER, SQL_TSI_YEAR.
    Cheers,
    Aravind

  • Intermediate time in calculation field in BAM11g

    I have two field in my data object receivedtime and endtime.Is there any way to get intermediate time in calculation field?

    I can think of implementing it like this:
    1. Create a calculated field c1 as endtime - receivedtime. This will give you c1 value as an integer which represents seconds.
    2. Create another calculated field c2 as DateAdd(receivedtime, 0, 0,0,0,0,c1/2,0). DateAdd is of this format: DateAdd(receivedtime, yy,mm,dd,hh,mm,ss,millisec)
    c2 should give you intermediate datetime value.

  • Time of calculation before aggregation is obsolete

    Hi Gurus,
    I have this message when i try to ejecute my query, can anyone help me to resolve this problem, i have the SAP 7.0 EHP 1, and i just have the upgrade from SAP 3.5.
    I have a lot of CKF's in my queries and all of those use BEFORE AGGREGATION option, when i put in the propietries of my CKF the option after aggregation and then i check my query i have a message "time of calculation before aggregation is obsolete", and then when i put the option before aggregation in my CKF i have the message "CALLATE = 0 is not allowed".
    I hope that someone have the same issue and can help me with this.
    note: i'm using the BEX 3.5 and the BW 7.01 because the client wants that.
    tnks
    regards
    Odiseo
    Edited by: Odiseo BW on Oct 18, 2010 7:46 PM

    hmmm... how about checking the differences between 3.X & 7.X???
    before aggregation is no longer possible in 7.X, hence the error messages

  • Arbitrary time period calculation.

    How to do time series calculations for custom time series which are not sequential.
    We have time period called diet which is not sequential like calender date Example given below :-
    May 2012 Diet starts from 24/04/2012 to 16/06/2012 And May 2011 Diet starts from 01/02/2011 to 31/05/2011 diff
    100 50 50
    we need to compare May 2012 diet to May 2011 diet and create a difference column and also need to calculate variance on this. Also need to add other dimension like geography and status
    For this i tried to use Ago function but it wont allow us to calculate as they are not sequential
    Let me know if there is any solution.
    Thanks
    prabhu

    Any one on this ....

  • [svn:osmf:] 14326: ChromeLibrary: fixing hints from appearing at the wrong vertical offset, and preventing scrub bar time remaining calculations to go negative.

    Revision: 14326
    Revision: 14326
    Author:   [email protected]
    Date:     2010-02-22 08:10:39 -0800 (Mon, 22 Feb 2010)
    Log Message:
    ChromeLibrary: fixing hints from appearing at the wrong vertical offset, and preventing scrub bar time remaining calculations to go negative.
    Modified Paths:
        osmf/trunk/libs/ChromeLibrary/src/org/osmf/chrome/controlbar/widgets/ScrubBar.as
        osmf/trunk/libs/ChromeLibrary/src/org/osmf/chrome/hint/Hint.as

  • Time machine calculating size

    Time machine calculation size forever (at least all night) and never concludes.  Have to force reboot to recover.  MAC os 10.7.4.

    This simple procedure will clear your Time Machine settings, including both overt and hidden exclusions. The backups won't be affected. If you have a long exclusion list that can't be recreated easily, you may prefer a more complicated procedure that preserves the exclusion list. In that case, ask for instructions. Otherwise, do as follows.
    Triple-click the line below to select it:
    /Library/Preferences/com.apple.TimeMachine.plist
    Right-click or control-click the highlighted line and select
    Services ▹ Reveal
    from the contextual menu. A Finder window should open with a file selected. Copy it to the Desktop. Then move it (the original, not the copy) to the Trash. You'll be prompted for your administrator password. Reboot, recreate your settings in the Time Machine preference pane. It will show that you have no backups. Don't be alarmed; that's expected. Run a backup to test. If TM now performs as expected, delete the file you copied to the Desktop.

  • Date VS Date Time in Calculated Field

    I have a property for a patients records called Date of Birth. On the table defining it I saved it as a "date" type and It displays only
    the date on the screen as I would like. For some reason though when I needed a calculated field in the Medication record I added a property to the patient records table that concatenated two fields BirthDate and the Age. I used the following code and then
    added an other screen data item on the medication screen to pull the DoBA property up but got a Date/Time instead of just a Date.
    partial void DoBA_Compute(ref string result)
    // Set result to the desired field value
    result = "DoB:" + BirthDate + " Age:" + Age;
    //This is for the property "Date of Birth and Age"
    //I also used the following code to calculate "Age"
    partial void Age_Compute(ref int result)
    // Set result to the desired field value
    int age = DateTime.Now.Year - BirthDate.Year;
    if (BirthDate > DateTime.Now.AddYears(-age)) age--;
    result = age;
    Images

    I'm using cast instead of Convert.ToInt because the last round to value to upper int if value > 0.5 or to lower if value < 0.5 ( I don't remember now if equal goes to < or > ... read function doc ) while Cast to int do not round the value.
    In my code the day of the birthday
    still
    marks
    the
    previous
    age,
    from the
    day after
    one more year.
    by adding
    +
    1
    age
    increases
    by the
    day
    of the birthday

  • I don't see Time Intelligence Calculated members in Universe

    Hi there,
    I use Universe (BO XI 3.0) designer over MSSSAS 2005. I created calculated member for Time dimension using wizard for YTD, MTD calculations. I can browse the results from cube no problem. But then I created a universe on top of my cube and tried to connect that universe from Desktop it doesn't show those calculated members at all.
    Could you advice any tricks or tips that allow to solve a problem, please?
    Any help is greatly appreciated.
    Thank you,
    Michael

    Michael,
    A universe contains only metadata: dimensions, hierarchies and levels
    The only members defined in the universe are the measures.
    Other members are only accessible and visible in the final document or in the list of values.
    So concerning your calculated member, if it is not linked to a particular hierarchy and linked to a parent I doubt that we will see it in a document. But for sure you will never see it in the universe.
    Didier

  • Time Machine - Calculating Changes

    Many have suffered from Time Machine getting stuck at 99% after a Time Capsule added to system. I was tortured by the same problem and finally fixed it by reasoning things out. Remember, Time Machine looks to back up everything. When you add a Time Capsule your old Time Machine files remain somewhere. In my case it was on another smaller internal SATA. When I added the TC, I forgot to exclude my old Time Machine drive. I went into TM preferences and excluded it and Voila! No more problems. Calculating 99% went away and the backup through ethernet Time Capsule proceeded quite quickly and without problem. I guess Time Machine does not like to back up it's own files on a non-selected drive.
    I hope this helps others who are suffering. Worked like a charm.
    Ted Stam

    hc2008 wrote:
    Network destination already mounted at: /Volumes/WD External
    Disk image /Volumes/WD External/HCC.sparsebundle mounted at: /Volumes/Time Machine Backups
    Backing up to: /Volumes/Time Machine Backups/Backups.backupdb
    It +has found+ the sparse bundle. It's not looking for the previous backups on your other internal HD.
    Backup content size: 157.8 GB excluded items size: 3.5 GB for volume Macintosh HD
    That message is sent when +Calculating Changes+ finishes -- TM has estimated how large the backup will be. The +Copying xx of yy GB+ message should be shown on the TM Preferences panel and the menu when you press the TM icon in your Dock.
    Try all the things in #D2 of the Time Machine - Troubleshooting *User Tip,* also at the top of this forum.
    Be sure the disk is formatted properly -- either GUID or APM *Partition Map Scheme* and +Mac OS Extended (Journaled)+ Format.
    Try all the things in #D2 of the Time Machine - Troubleshooting User Tip, also at the top of this forum.
    Also try connecting via Ethernet if possible, for the first full backup. That will be much faster, of course, and will rule out a bad WIFI connection.
    As a last resort, per your earlier post, try erasing the TM disk.

  • Time Stamp Calculation

    Hi,
    I am using Oracle Database version 11.2.1 and would like to calculate the time difference in minutes between start_date, start_time and end_date, end_time. The date is stored in a seperate column to the time. Also the time is stored as a number.
    Please see the test scripts below:
    create table test
    (start_date date,
    start_time number,
    end_date date,
    end_time number)
    insert into test values('20-JAN-2012', 103413, '01-FEB-2012', 110917);
    insert into test values('01-MAR-2012', 091734, '01-MAR-2012', 103555);
    insert into test values('19-APR-2012', 103413, '20-APR-2012', 125012);
    insert into test values('13-JUL-2012', 123432, '13-JUL-2012', 123450);
    insert into test values('01-MAY-2013', 164522, '06-MAY-2013', 110917);
    insert into test values('10-MAY-2013', 085011, '13-MAY-2013', 135635);
    Please note that the following exceptions need to be taken into account in the calculation
    1. Exclude weekends (Sat & Sun)
    2. Only calculate working hours from 08:45am to 17:15pm
    Can anyone help?
    Thanks

    sliderrules wrote:
    Hi,
    The fields are stored this way in the system and are extracted as two seperate columns. Can the data and time be combined into one date field?Hi,
    I agree with John that this is a really bad design. You actually don't need start_time and end_time as you can have all the information start_date and end_date.
    i.e.:
    update test
       set start_date = TO_DATE(TO_CHAR(start_date,'YYYYMMDD')||TO_CHAR(start_time,'fm000000'), 'YYYYMMDDHH24MISS')
         , end_date   = TO_DATE(TO_CHAR(end_date  ,'YYYYMMDD')||TO_CHAR(end_time  ,'fm000000'), 'YYYYMMDDHH24MISS');
    select start_date, end_date
    from test;
    START_DATE            END_DATE            
    20/01/2012 10:34:13   01/02/2012 11:09:17 
    01/03/2012 09:17:34   01/03/2012 10:35:55 
    19/04/2012 10:34:13   20/04/2012 12:50:12 
    13/07/2012 12:34:32   13/07/2012 12:34:50 
    01/05/2013 16:45:22   06/05/2013 11:09:17 
    10/05/2013 08:50:11   13/05/2013 13:56:35  And for calculate your working hours you can have a look at this: {message:id=10655484}
    Regards.
    Al
    Edited by: Alberto Faenza on May 21, 2013 2:11 PM
    Added link for hours calculation

  • Time Passage Calculation excluding Weekends and Non-work hours

    Good Afternoon Everyone!
    I am currently using the expression below to determine the amount of time that has passed since a Task has been created.
    TIMESTAMPDIFF(SQL_TSI_MINUTE, Activity."Created Date", NOW())
    We have a completion goal for a specific task type of 2 hours (120 minutes), but it should only be calculated minutes between 7 AM and 4 PM and only on week days.
    So, a task created at 3:50 PM on a Friday that is completed at 7:30 AM on the following Monday should only calculate to 40 minutes of time.
    I am at a loss for where to start tackling this problem. If any of you can help I would be very appreciative!

    Hey Paul, thanks for the prompt. I see now that the formula is incomplete.
    As I have just taken the difference in days between the Activity Start Time and End Time, it will consider any weekend. But its incomplete as it considers only 15 hours of a day and not the remaining 9 hours for weekends. For holidays - we do need a field or something to identify it like Activity Type = 'holiday'.
    So the ELSE* part of revised formula would be something like this:
    ... ELSE TIMESTAMPDIFF(SQL_TSI_MIN,activity start time,activity end time) - (60*15*(DAY(Activity End Time) - DAY(Activity Start Time))) - (60*9*(COUNT(DISTINCT CASE WHEN DAYOFWEEEK(Date.Date) IN (6,7) OR ~some field to identify holiday~ = 'something' THEN 1 END)) END
    now imagine there's one activity that started on Friday 7:00 AM and ends on coming Monday at 4:00 PM.
    Actual duration is 18 hours.
    Now,the first term after ELSE will give 81*60 minutes. next term should give 45*60 minutes. third term would be 18*60 min.
    so the entire expression would return 18 hours.
    Even if there's a holiday, then i guess the 'OR' part should capture it.
    I hope this makes sense. Please let me know if it should need any further corrections.

  • Better approach time series calculations

    Hi,
    I have a technical answer. In your opinion, to improve performances, is better calculate YTD, QTD, PY.... etc., values using Time Series functions available in OBIEE (YearToDatel, AGO, PERIODROLLING...) or put them in ETL Flow so OBIEE Server only must take results without any calculations?. Using OBIEE Functions the effort is less, but perhaps they create overhead for OBIEE Server so query time responses increase dramatically?
    Have you an example showing queries to perform to calculate Time Series Functions without OBIEE functions, so I can insert them in my ETL flows?
    Thanks
    Giancarlo

    OK,
    but it's better to have only one fact table containing columns for all measures I need (e.g. first column: YTD, second column: QTD, third column: MTD)... and so on (so i would have a LTS with only one Source table) or a distinct table for each measure (e.g. Table FACT_TABLE_A_YTD, FACT_TABLE_B_QTD and so on and combining them in a LTS having multiple Sources (FACT_TABLE (monthly), FACT_TABLE_A_YTD, FACT_TABLE_B_QTD)...
    Giancarlo

Maybe you are looking for

  • Problem with a rented movie in Apple TV

    I rented a movie in my AppleTV, after a big loading time, by mistake I stopped the the loading. Now I only get the "thinking" disc and cannot confirm the rent. What do I do to get the movie back?

  • Need to change the Tag name of Response Tag.

    Hello, While creating the Wsdl in eclipes, in which,I put operation name is (*PX_GET_INSTPRD*) Then automatically get its elements for input= (*PX_GET_INSTPRD*) and for output (*PX_GET_INSTPRDResponse*). I change the output element to PX_GET_INSTPRD_

  • Want to know that any standand Tcode about PC System information ?

    Dear Experts,                      I Want to know that any standand Tcode about PC System information ? ie, a hardware Engineer,System Admin can know a PC system information details like operating system, Processor & mother board, drives, RAM Memory

  • [Solved] How to update records in entity based on view with distinct

    Hi - I have a relational view of the form: SELECT DISTINCT FROM TAB1, TAB2, ...- I created instead of triggers for delete, update and insert. - I created an entity object on this and an updatable view object - I added this to my module. - Then I test

  • BADI OR USER EXIT AT THE TIME OF SAVING THE TCODE MIGO TO UPDAT FIELD LSMNG

    Hello Guru, I am using BAPI  BAPI_GOODSMVT_CREATE for GRN creation it is working fine. But i want to update DELIVERY NOTE QUANTITY (LSMNG) at the time of GRN Creation . This field is not provided in the BAPI . What i had done i had applied BADI MB_MI