BO 3.1 WEBI Time format variable not showing correctly

Hi,
I apologise in advance. I know this topic has been covered many times in previous forums but I have been through each and I am still encountering an issue.
My requirement is to convert x number of seconds into a HH:MM:SS time format for both positive and negative numbers in WEBI.
I found a formula on a forum here that suggest using the following code:
=FormatNumber(Floor([Column_Name]/3600) ;"0") + ":" + FormatNumber(Floor(Mod([Column_Name];3600)/60);"00") + ":" + FormatNumber(Mod(Mod([Column_Name] ;3600) ;60) ;"00")
I have used this code and when I give the code an input of -720 seconds it outputs in the format -1:-12:00.
It is quite frustrating I cannot get this to the correct format, can anyone suggest what is wrong with this formula?
I am using WEBI for creating the formula on BO 3.1.
Kind Regards,,
John

Hi,
Let me try.
This is your formula.
=FormatNumber(Floor([Column_Name]/3600) ;"0") + ":" + FormatNumber(Floor(Mod([Column_Name];3600)/60);"00") + ":" + FormatNumber(Mod(Mod([Column_Name] ;3600) ;60) ;"00")
Issue with this formula is only when you have used negative seconds.I have break the formula =FormatNumber(Floor([Column_Name]/3600) ;"0")  and found this is giving the wrong result.If you divide -720/3600 you will get 0.2 and nearest integer is 0 but in this case 1 is coming.
Same time it is working properly with 720 and  the result  will be 0.
In this case i have  created one variable  which  convert the negative values to positive.If you enter -720 then it will convert 720 and you will get the 0 from first part.
=If([Column_Name]<0) Then ([Column_Name]*-1) Else [Column_Name]
Second part is if you entered the negative values then output should be in the negative.but with above condition you will get the positive values.
Again i have created the formula If([Column_Name]<>[Column]) Then "- which compare the object values and see if I have changed anything.
Like i have entered -720 so first variable will convert to 720 then in next formula it will check -720 is not equal to 720 (Which is not) then add - (minus sign) and same calculation else part if is equal then use the same formula which you have put.
Hope this is clear to you.
Regards,
Amit

Similar Messages

  • Times of posts not showing correctly for my time zone

    The times of posts not showing correctly for my time zone ( I am in London UK).
    How do I fix this?
    TIA

    Your stuff>profile>edit preferences
    Barry

  • System variables not showing correctly in body pages

    Can anyone help with a problem I'm having with system variables please?
    I have created a template and multiple documents which all use a system variable for placing the chapter number and page number in the footer: <$chapnum>-<$curpagenum>
    I have just created a new document and want to use the same variable on the main pages of the document but I want to use a different page number variable on the TOC. For some reason now, when I create a new variable of <$curpagenum> it doesn't show correctly on the document; it's showing as: <$curpagenum
    I've also tried using the format of <$chapnum>-<$curpagenum> that has worked on other documents but now this shows in the document footer as: <$chapnum<$curpagenum
    Has anyone seen this problem before?
    Thanks

    Hi Art, thanks for the reply.
    In my original documents I'd edited the Current Page system variable from <$curpagenum> to <$chapnum>-<$curpagenum>. This worked correctly.
    In the new document I tried both the picking-and-clicking method and typing the string to get the same footer but neither worked.
    I've now changed it as you suggested, selecting the two seperate system variables of <$chapnum> and then <$curpagenum> and this seems to have solved the problem.
    I'll know to keep things simple in future!
    Thanks.

  • BEx variables not showing correct order despite ordering at query level

    Dear Experts,
    I am using a workbook with 2 queries sharing same variables.
    The Queries variable order for display in the popup screen has been re-arranged at Query designer level (query properties > variable sequence). Regenerated queries. Relogin to BEx . Re-run workbook. Same old order.
    Please advise what could be the cause. I am also wondering if this is due to personalisation.
    regards
    Bass

    Hi Bass,
    You mentioned workbook.
    If the query itself also has this problem, it can be a bug as SAP Note 1568815.
    Symptom
    The sequence of the variables in the variable screen is lost.
    You may implement the correction of this note via transaction SNOTE if the SP of your system fits.
    After that, you need to regenerate the query in RSRT.
    Regards,
    Patricia

  • Not showing correct output when parsing the date

    //WAP the gives the details of employees
    import java.io.*;
    import java.util.*;
    import java.text.Format;
    import java.text.DateFormat;
    import java.text.ParseException;
    import java.text.SimpleDateFormat;
    class employee
      private String nm,curr_dt;
      private Date dob,doj;
      private int salary;
               employee()
                  nm="\0";
                  dob=null;
                  doj=null;
                  curr_dt=null;
                  salary=0;
               void getdata()throws IOException
                  String dt;
                  BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
                  //we can create date with these 3 type of objects
                  Format fm=new SimpleDateFormat("dd-mm-yyyy");
                  DateFormat df=new SimpleDateFormat("dd-mm-yyyy");
       //object of base class are type compatible with the object of derived class
                  SimpleDateFormat sdf=new SimpleDateFormat("dd-mm-yyyy");
                  System.out.print("\nEnter the name of Employee : ");
                  nm=br.readLine();
                  try{
                  System.out.print("\nEnter the date of birth of Employee : ");
                  dt=br.readLine();
                  dob=(Date)fm.parseObject(dt);
                  System.out.print("\nEnter the date of joining of Employee : ");
                  dt=br.readLine();
                  doj=df.parse(dt);
                  }catch(ParseException e){
                  Date d=new Date();
                  curr_dt=sdf.format(d);
                  System.out.print("\nEnter the salary of employee : ");
                  salary=Integer.parseInt(br.readLine());
               void putdata()
                  System.out.println("\n\n\nEmployee Name : "+nm);
                  System.out.println("\nDate of birth : "+dob);
                  System.out.println("\nDate of joining : "+doj);
                  System.out.println("\nCurrent date : "+curr_dt);
                  /*if((doj-curr_dt)>1)
                       salary+=3000;
                  System.out.println("\nSalary of Employee : "+salary);
    class emp
      public static void main(String str[])throws IOException
           employee emp[]=new employee[1];
           System.out.println("\nEnter the detail of employees \n\n");
           for(int i=0;i<1;i++)
                emp=new employee();
    emp[i].getdata();
    System.out.println("\n\nDetail of employees are\n\n");
    for(int i=0;i<1;i++)
    emp[i].putdata();
    }*Output:*
    Enter the detail of employees
    Enter the name of Employee : Rajendra Sharma
    Enter the date of birth of Employee : 10-10-1979
    Enter the date of joining of Employee : 05-09-2004
    Enter the salary of employee : 2000
    *it is not showing date in the "dd-mm-yyyy" format and not showing correct month as well*
    Detail of employees are
    Employee Name : Rajendra Sharma
    Date of birth : Wed Jan 10 00:10:00 IST 1979
    Date of joining : Mon Jan 05 00:09:00 IST 2004
    Current date : 17-08-2008
    Salary of Employee : 2000                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hi,
    Use below code that will help u to sort ur problem.
    import java.io.*;
    import java.util.*;
    import java.text.Format;
    import java.text.DateFormat;
    import java.text.ParseException;
    import java.text.SimpleDateFormat;
    class employee
    private String nm,curr_dt;
    private Date dob,doj;
    private int salary;
    private String dobb,dojj;
    employee()
    nm="\0";
    dob=null;
    doj=null;
    curr_dt=null;
    salary=0;
    void getdata()throws IOException
    String dt;
    BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
    //we can create date with these 3 type of objects
    DateFormat fm=new SimpleDateFormat("dd-mm-yyyy");
    DateFormat df=new SimpleDateFormat("dd-mm-yyyy");
    //object of base class are type compatible with the object of derived class
    SimpleDateFormat sdf=new SimpleDateFormat("dd-mm-yyyy");
    System.out.print("\nEnter the name of Employee : ");
    nm=br.readLine();
    try{
    System.out.print("\nEnter the date of birth of Employee : ");
    dt=br.readLine();
    dob=(Date)fm.parseObject(dt);
    dobb= fm.format(dob);
    System.out.print("\nEnter the date of joining of Employee : ");
    dt=br.readLine();
    doj=df.parse(dt);
    dojj = df.format(doj);
    }catch(ParseException e){
    Date d=new Date();
    curr_dt=sdf.format(d);
    System.out.print("\nEnter the salary of employee : ");
    salary=Integer.parseInt(br.readLine());
    void putdata()
    System.out.println("\n\n\nEmployee Name : "+nm);
    System.out.println("\nDate of birth : "+dobb);
    System.out.println("\nDate of joining : "+dojj);
    System.out.println("\nCurrent date : "+curr_dt);
    /*if((doj-curr_dt)>1)
    salary+=3000;
    System.out.println("\nSalary of Employee : "+salary);
    class emp
    public static void main(String str[])throws IOException
    employee emp[]=new employee[1];
    System.out.println("\nEnter the detail of employees \n\n");
    for(int i=0;i<1;i++)
    emp=new employee();
    emp[i].getdata();
    System.out.println("\n\nDetail of employees are\n\n");
    for(int i=0;i<1;i++)
    emp[i].putdata();
    thanks,
    prabhu selvakumar.

  • Web template data is not showing

    Hello All,
    Can any one tell me what would be the reason that when i am executing the query separately it is showing the data but when I execute the web template it is not showing any data it shows as No applicable data. Please note I am using the same selection for the both execution.
    Is there any setting in WAD for this kind of error?
    Thanks in advance
    Nitin

    Hi Nitin,
    The report will show as "no applicable data found" only when the report doesn't contain the data which meet our req selections.If you have any variable selection screen before executing the web report, run with out giving any selctions.If that is a mandatory variable then make them as optional and run with out giving any selections.But , If you want selected data and the report is showing no data when you give that selections means, there is no data available for that selection combinations.So, check this once.
    Thanks.

  • Text Variable not showing headers in Formula

    I have text variable in my report when I use in Formula its not working.Its a replacement path and if I used in normal col its showing header correctly.
    Any ideas guru's
    Thanks in Advance!
    Andy

    As I mentioned when I use in Formula to add up these text variables header is not showing.
    EG: &ZP_FPTA&  &ZP_FPTB&  &ZP_IPVERS& this is in one col and there is another Variable like this I am adding up in Formula ,Addition is working but header is not showing correct
    It shows as Tech name of variable only not picking up description from Variables..
    hope this is clear..
    Andy

  • After install of Lion, secondary internal hard drive used for backup and time machine is not showing on the desktop.

    After an install of Lion, my secondary internal hard drive used for backup and time machine is not showing on the desktop. Cannot be located with Disk Utility either. Contains vital files! please help...

    I have a TB internal drive, but this is what it shows for memory slots:
    Memory Slots:
      ECC:    Enabled
    DIMM Riser B/DIMM 1:
      Size:    2 GB
      Type:    DDR2 FB-DIMM
      Speed:    800 MHz
      Status:    OK
      Manufacturer:    0x0000
      Part Number:    0x000000463732353642363145353830304600
      Serial Number:    0x00000000
    DIMM Riser B/DIMM 2:
      Size:    2 GB
      Type:    DDR2 FB-DIMM
      Speed:    800 MHz
      Status:    OK
      Manufacturer:    0x0000
      Part Number:    0x000000463732353642363145353830304600
      Serial Number:    0x00000000
    DIMM Riser A/DIMM 1:
      Size:    1 GB
      Type:    DDR2 FB-DIMM
      Speed:    800 MHz
      Status:    OK
      Manufacturer:    0x80AD
      Part Number:    0x48594D5035313241373243503844332D5335
      Serial Number:    0x42076007
    DIMM Riser A/DIMM 2:
      Size:    1 GB
      Type:    DDR2 FB-DIMM
      Speed:    800 MHz
      Status:    OK
      Manufacturer:    0x80AD
      Part Number:    0x48594D5035313241373243503844332D5335
      Serial Number:    0x4207631E
    DIMM Riser B/DIMM 3:
      Size:    Empty
      Type:    Empty
      Speed:    Empty
      Status:    Empty
      Manufacturer:    Empty
      Part Number:    Empty
      Serial Number:    Empty
    DIMM Riser B/DIMM 4:
      Size:    Empty
      Type:    Empty
      Speed:    Empty
      Status:    Empty
      Manufacturer:    Empty
      Part Number:    Empty
      Serial Number:    Empty
    DIMM Riser A/DIMM 3:
      Size:    Empty
      Type:    Empty
      Speed:    Empty
      Status:    Empty
      Manufacturer:    Empty
      Part Number:    Empty
      Serial Number:    Empty
    DIMM Riser A/DIMM 4:
      Size:    Empty
      Type:    Empty
      Speed:    Empty
      Status:    Empty
      Manufacturer:    Empty
      Part Number:    Empty
      Serial Number:    Empty

  • Itunes was not installed correctly error 1114.  I have uninstalled and reinstalled using the steps several times., itunes was not installed correctly error 1114.  I have uninstalled and reinstalled using the steps several times.

    itunes was not installed correctly error 1114.  I have uninstalled and reinstalled using the steps several times., itunes was not installed correctly error 1114.  I have uninstalled and reinstalled using the steps several times.
    I have never been so close to packing the whole lot up and sending the ipad back!
    Please help!
    Kieran

    Issues installing iTunes or QuickTime for Windows
    iTunes 11.1.4 for Windows: Unable to install or open
    Troubleshooting issues with iTunes for Windows updates

  • The web site of Adobe does not show correctly in FireFox

    I have a bizarre problem.  The site of Adobe (including where I can download the flash player) does not show correctly in FireFox and I only see it as a text HTML page, but without most images (typically, for instance, I do not see the image "Download now" but see a text line "Dowload now", and so on...
    This seems to specifically affect the Adobe web site as I have no problme for other web sites (so far).
    It is something specific to FireFox as  I do have the problem with Internet Explorer.
    The problem persis even if I restart FireFox without any add-on (safe mode).
    Any suggestion ?

    Does this only happen in Firefox?  What do you see with Internet Explorer or Chrome?  If it is only Firefox, I'd try these steps in this order:
    1. Clear your cookies and cache
    2. Reset your Firefox settings
    3. Make a new profile
    Chris

  • Date Format was not displayed correctly

    Hi All,
            We are developing WebDynpro Application successfully....but the date format was not displayed correctly.
    the RFC Date format is : 05/23/2007
    but in webdynpro we are getting date is wrong....we are getting date is : 09/05/2008.
    the below one is our coding for date display format.....
    public java.lang.String DisplayingDateFormat( java.lang.String date )
        //@@begin DisplayingDateFormat()
                        // Current date Format in BW
    SimpleDateFormat sdf = new SimpleDateFormat("MM.dd.yyyy");
    String ChangedDateFormat=null;
    try{
    //Parsing String to Date
    Date sqlDate =sdf.parse(date);
    Locale userLocale=WDClientUser.getCurrentUser().getLocale();
    DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.DEFAULT, userLocale);
    //Converting Date to String
    String newDateString = dateFormat.format(sqlDate);
    ChangedDateFormat=newDateString;
    I mention my user country is Germany.
    can u tell me any one why we are getting wrong date.....
    Really i appreciate.
    Thanks and Regards,
    Abhiram.

    Too bad you can not offer yourself points. LOL

  • Problem with waveform chart: time scale does not show time correctly

    Hello,
    I have some problems with a chart.
    I want to display some data and the time between two single data can vary. It is something between 50ms and 500 ms.
    The problems I have:
    1. The time is not shown correctly in the chart (allways 2:00:10 instead of the current time)
    2. the data points in the chart have a distance of 1 s (x-scale). That is not correct.
    I have tried several things but I thinkt I am on the wrong track.
    Could you please help me?
    Johannes
    LabVIEW 7.1 (!)
    Message Edited by johanneshoer on 10-14-2009 04:26 AM
    Greetings Johannes
    Using LabVIEW 7.1 and 2009 recently
    Solved!
    Go to Solution.
    Attachments:
    Chart Test.vi ‏55 KB

    I have modifierd the vi again.
    Now it looks much better.
    I have a data array and the last 10 seconds of the data are displayed.
    The array size is maximum 150 and that is more than I need to display. If new data is inserted, the oldest gets deleted.
    I wonder if this style is efficient?
    The time is stil not displayed correctly in the graph. Why does it always show 2:00:00 ?
    Johanens
    LabVIEW 7.1
    Greetings Johannes
    Using LabVIEW 7.1 and 2009 recently
    Attachments:
    Chart Test 3.vi ‏57 KB

  • Time capsule does not show the blue bars near backing up.  Any idea why?

    Time Capsule is not showing that it is backing up.  Any idea why?

    For some reason it was going in a loop.  Support had me omit some com.apple....plist files.  Retarted and Tiime Capsule started as though it had never seen the external hard drive.  I set it up again and it worked fine.
    Thank you,

  • MiniDV Video in Affert Effects not showing correct ratio.

    I'd like to know how to edit minidv video in its aspect ratio in After Effects. Video is 720 by 480 and 16 by 9 (non-square pixels). When I import the video, it's stretched too tall (set to square pixels I believe). No mater how many times I change the composition ration to widescreen, it still does not show correctly.
    I seem to do fine in Premiere. It automatically sets the aspect ratio for minidv video. But I can't get After Effects to do it. I don't want to spend time creating something only for it to be squished in Premiere later.
    So how to do create a composition that's 16 x 9 using non-square pixels 720 by 480 that can be edited into miniDV video in adobe premiere?

    If you properly interpret your footage as widescreen (AE may guess incorrectly here) and put it in any square pixel comp it will not look distorted but it may or may not fill the frame. It will only fill the frame if the frame size is the square pixel equivalent size of your widescreen footage. This applies to all non square pixel aspect ratio footage.
    If you interpret your footage as widescreen and put it in the same format (NTSC, PAL HDV) widescreen comp it will also fill the frame. There may be some black pixels on the left and right side because almost all cameras don't put live pixels in every column or even every row of the frame, but the footage will fill the frame. The caveat is that this footage will look distorted unless you activate pixel aspect correction preview in the Comp window because computer displays are always square pixels. You have to fool the display by selecting this option.
    When you render your widescreen comp, if you're using any of the standard DV codecs or a codec like Quicktime Animation or JPG, there is no place in this codec for an aspect ratio tag that will tell apps like Premiere or FCP or Avid that this footage is supposed to be widescreen. Once you import the footage to another app you'll have to check and make sure that the footage is interpreted as widescreen there too.
    I hope this helps. What ever you do, do not use the Fit to Frame option to force footage into a comp frame. If you insist on using Fit to Frame then check the X and Y scale values after you do and make sure they are identical. If they are not, you've distorted your footage at that point and it will be difficult or impossible to fix it later.

  • SharePont 2013 Document Library lookup Column Properties not Showing Correctly when editing in Word

    Hi
    I keep seeing this issue albeit intermittently.  I have set up a doc library for my users which has a custom content type (lookup, metadata columns, etc)  . They all appear perfectly most of the time except the lookup column. Sometimes is just
    decides to display the title field of the current library and not the lookup list title .  It is weird as it has been working perfectly for ages given the library is populated with valid documents.
    There are some fixes listed here. Has anyone got any experience of this?
    https://social.msdn.microsoft.com/Forums/azure/en-US/e0b55531-509c-4219-8113-61b3e488de69/document-library-metadata-properties-of-a-content-type-do-not-show-correctly-when-editing-in-word?forum=sharepointdevelopmentprevious
    Freelance consultant

    Hi,
    According to your post, my understanding is that the lookup  column not display well while editing in word.
    Did you customize the Document Information Panel?
    I recommend you edit your custom document information panel or create a new document information panel, then re-publish it to check whether it works.
    https://support.office.com/en-gb/article/Create-or-edit-a-custom-Document-Information-Panel-for-a-content-type-b701a9af-3ea6-4c1a-9e1c-75363bd987c9?ui=en-US&rs=en-GB&ad=GB
    Or you can also use the methods in the post you have pasted to check whether it works.
    As the limitation of the environment, we could not reproduce the issue in our environment.
    I  would suggest you open a case to Microsoft Customer Service via Phone.
    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

Maybe you are looking for

  • Application shortcut for bookmarks toolbar not working on firefox for mac

    OS X allows users to assign shortcut keys to arbitrary menu items. I'm trying to add an application shortcut to firefox to show/hide the bookmarks toolbar (in my case, I'd like to use cmd-ctrl-L, but I've tried others too), however the shortcut key d

  • How do I make a music playlist in adobe edge

    im trying to make a music playlist in adobe edge. The playlist must have multiple buttons that when you press the different buttons they play different songs. Could some one tell me how to make this or place a music playlist created in adobe edge for

  • Input element in web dynpro java not working

    Hi, Iam new to webdynpro java. iam trying on external context mapping example from sap help.when i run the application i have assigned a context to a input element that should be accessed  by another other component's window view .when i follow steps

  • Powerpoint file made on PC and edited on Mac will not open on PC

    I've created a Powerpoint presentation on my work PC. I then made some changes to it on my iMac and now the file will not open on the PC. The error message is: "Powerpoint can't read [file name]" The edited file opens on the mac and I made sure the e

  • Sharing context across views

    Hi. Each of the individual views (10+) in my WebDynpro application needs to know and display the same employee information about the logged-in user. Further, the user can enter the application from any one of the views. And once the application is en