Epoch Formula

I am trying to convert some epoch dates to just Date in a formula. Nothing seems to work, any one had this problem or have a suggestion?

This normally suggested to do in ETL process, because any ETL tool handle this very easily.
If you dont have any option to do it en ETL, then do the following.
1. In physical layer change the data type of column to INT
2. Then in Business Model create a column with the following code. Here UNO_EVENTENGINEERING.CLOSEDDATE is my EPCOH date stored in database.
TimestampAdd(SQL_TSI_SECOND, UNO_EVENTENGINEERING.CLOSEDDATE, TIMESTAMP '1970-01-01 00:00:00.000')
3. check the dates, if your unix server is saving the date in GMT 0, Then you need to adjuct above date based on your time zone.
- Madan

Similar Messages

  • Convert date/time to Unix epoch

    I have thousands of date time stamps I would like to convert to Unix epoch ten-digit strings. That is, take some thing like:
    Dec 9, 2005 10:24 AM
    and convert to
    1234567890 (only in the correct unix epoch time)
    What formula can I use? I've found that this "=DATE(1970,1,1)+P2/86400" can convert a 10 string epoch time down to just a date correctly, but without time. But I need to go in the opposite direction, with the time included.
    Using Numbers 09 ver 2.0.5 (368)

    CP,
    An up-to-date Unix Time would be provided by:
    =DUR2SECONDS((NOW()-"1/1/1970"))
    A somewhat more robust form would be:
    =DUR2SECONDS(NOW()-DATE(1970,1,1))
    If the time to be converted is in Cell P2, the expression would be:
    =DUR2SECONDS(P2-DATE(1970,1,1))
    Jerry

  • Year to date of epoch time

    I am doing a report where I would like to select records year to date. My difficulty is that the date field is in epoch time from 1/1/1990. What would be the formula for this record selection? I know I could use yeartodate and dateadd but am having trouble pinning it down. Thank you.

    EPOCH time starts from 01/01/1970 are you sure it is 01/01/1990?
    In your record selection criteria use:
    DateAdd ("s",{epoch.datefield}-18000, #1/1/1970#) in YearToDate
    This checks for Eastern Time, just add 3600 to 18000 for each hour that is behind Eastern Time Zone.

  • Convert Epoch date to Minutes

    How to convert epoch date to minutes in CR XI?
    Can anyone help?

    It's my understanding that Epoch is the number of seconds that have elapsed since 1/1/1970.
    So is you want to convert it to a date, the following formula should work.
    DateAdd("s", {TableName.EpochDate}, #1/1/1970#)
    If all you are wanting to do is convert seconds to minutes, then simply divide by 60
    {TableName.EpochDate} / 60
    HTH,
    Jason

  • IF Statement in Member formula V11 -EPMA

    Hi,
    As any one used IF and ENDIF statement in the member formula on EPMA V11? I am using the same but it fails to deploy and I have no clue whatsoever.
    Does it require an expression OpenInputvaluebox and closedInputvaluebox
    Thanks in advance

    Hi,
    This is the member formula formula I am trying to load:
    IF (@IsMbr("Local"))
    IF (@IsMbr(Hsp_InputValue))
    IF (@IsMbr("No Year"))
    IF (@IsMbr("BegBalance"))
    IF (@IsMbr("Forecast"))
    "RTD" = "Apr"->"Periodic" ->&FcstYear1: "Mar" ->"Periodic"->&FcstYear1;
    ELSEIF (@IsMbr("RF1"))
    "RTD" = ("Jul"->"Periodic" ->&FcstYear1: "Mar" ->"Periodic"->&FcstYear1) + ("Apr"->"Periodic"->&FcstYear2 : "Jun"->"Periodic"->&FcstYear2);
    ELSEIF (@IsMbr("RF2"))
    "RTD" = ("Oct"->"Periodic" ->&FcstYear1: "Mar" ->"Periodic"->&FcstYear1) + ("Apr"->"Periodic"->&FcstYear2 : "Sep"->"Periodic"->&FcstYear2);
    ELSEIF (@IsMbr("RF3"))
    "RTD" = ("Jan"->"Periodic" ->&FcstYear1: "Mar" ->"Periodic"->&FcstYear1) + ("Apr"->"Periodic"->&FcstYear2 : "Dec"->"Periodic"->&FcstYear2);
    ENDIF;
    ENDIF;
    ENDIF;
    ENDIF;
    ENDIF;
    Is there a syntax error here?
    Cheers

  • Formula is not working in report

    Hi Friends,
    This is formula iam using in report.but in output iam getting only value 1.
    Iam not getting other values. I think my OR condition is not working.
    ( ( ( ( ( 'KF1' < 0.1000 ) * 1 OR ( ( 'KF1' >= 0.1000 ) AND ( 'KF1' < 0.1200 ) ) * 2 ) OR ( ( 'KF1' >= 0.1200 ) AND ( 'KF1' < 0.1500 ) ) * 3 ) OR ( ( 'KF1' >= 0.1500 ) AND ( 'KF1' < 0.1800 ) ) * 4 ) OR ( 'KF1' >= 0.1800 ) * 5 )
    Iam chenged open and close brackets....but it is not working.
    How to use if condition or else condition in formula?
    How can i get values in output accourding to range?
    Thanks in advance
    Ramu

    Hi Ramu,
    If condition can be used in Formulae like
    Conditional Calculations (IF-THEN-ELSE)
    You can make conditional calculations using Boolean operators An expression in the form
    IF<Logic Expression> THEN <Expression1> ELSE <Expression2> can also be made using a formula in the form
    <Logic Expression> * <Expression1> + NOT <Logic Expression> * <Expression2>
    Example: IF Actual Costs > Plan Costs THEN Plan Costs + Plan Deviation ELSE Actual Costs
    can be written as the following formula:
    (Actual Costs > Plan Costs)* (Plan Costs + Plan Deviation) + (NOT (Actual Costs > Plan Costs)) * Actual Costs
    or
    (Actual Costs > Plan Costs)* (Plan Costs + Plan Deviation) + (Actual Costs <= Plan Costs) * Actual Costs
    Please explain your case as its complex ...
    Thanks
    CK

  • BW 3.5 - Issue with formula variable with replacement path

    Dear experts,
    I'm facing an issue with formula variable with replacement path.
    Just to clarify, I know replacement paths is raising a lot of questions but I've been using this functionnality extensively in the past, both in 7.0 and 3.5, so I'm not looking for basic information about how to use it.
    I'm trying to setup a simple report that would show total values per plant of Purchase Order < 100 €
    To do so I've setup a calculated key figure as follow:
    VAR1 * ("PO value" < 100 ) * "PO value"
    VAR1 is a formula variable with replacement path on 'purchase order' and value attribute 'constant =1'.
    (The report has to show values summarized by plant but should not show the detail PO by PO, so I'm not looking at a solution based on condition)
    The report as characteristic "plant" in rows and my CKF in columns.
    Now let's take an example. I have 3 POs in Plant 1:
    PO1 -> 150€
    PO2 -> 90€
    PO3 -> 80€
    Because of the variable with replacement path, the result in my query should be:
    plant1 = 170 (even though characteristic "purchase order" is not in my rows, system should evaluate PO one by one and return values only for those two that are below 100).
    But the result coming is 320, which is wrong.
    I've done the same report on many other 3.5 systems and it worked perfectly, and I am not able to get proper support from SAP OSS who keep saying that this functionnality is not ready in 3.5 (although I've provided screenshot of this working on another 3.5 system!!! how frustrating...)
    They have also pointed to problems of Before and After aggregation but that has absolutely no impact. Once again, the scenario is working perfectly on other 3.5 systems with the same query design, so i'm sure it has nothing to do with Query Designer options.
    Would anyone have ever come to an equivalenet problem? I'm wondering whether the DB itself could not play a role in the variable with ref  characteristic 'constant =1' ...
    Any though is welcome!
    thanks

    Hi,
    The text variable is replaced when the exact date is clear for this key figure column according to the restriction.
    To achive this, please make sure that either the variable is directly restricted in the key figure selection, or that the date characteristic is in drilldown.
    Regards,
    Patricia

  • How can we remove the commas from the Formula value in SAP BW BEx query

    Hi All,
    How can we remove the commas from the Formula value in SAP BW BEx query
    We are using the formula replacing with characteristic.The characteristic value needs to be display as number with out commas.
    Regards
    Venkat.

    Do you want to remove the commas when you run the query on Bex Web or in RSRT?
    Regards

  • How to appear a formula field for once at a fom-like report?

    Hi All,
    I have created a formula field and then set the property "Maximum Records per page" to the value 12 for the repeating frame containing this field and all other fields.
    Now I want to make an exception for that formula field
    I want it to be appeared only for one time not 12 times!
    how to do this Plz?

    Hi,
    I assume that your formula column is at a higher level than your repeating frame (in other case it's not clear which value you want to display). Bring the filed representing the formula column behind the repeating frame, then it's diplayed only once.
    Regards
    Rainer

  • SSRS 2008 Column Chart with Calculated Series (moving average) "formula error - there are not enough data points for the period" error

    I have a simple column chart grouping on 1 value on the category axis.  For simplicity's sake, we are plotting $ amounts grouping by Month on the category axis.  I right click on the data series and choose "Add calculated series...".  I choose moving average.  I want to move the average over at least 2 periods.
    When I run the report, I get the error "Formula error - there are not enough data points for the period".  The way the report is, I never have a guaranteed number of categories (there could be one or there could be 5).  When there is 2 or more, the chart renders fine, however, when there is only 1 value, instead of suppressing the moving average line, I get that error and the chart shows nothing.
    I don't think this is entirely acceptable for our end users.  At a minimum, I would think the moving average line would be suppressed instead of hiding the entire chart.  Does anyone know of any workarounds or do I have to enter another ms. connect bug/design consideration.
    Thank you,
    Dan

    I was having the same error while trying to plot a moving average across 7 days. The work around I found was rather simple.
    If you right click your report in the solution explorer and select "View Code" it will give you the underlying XML of the report. Find the entry for the value of your calculated series and enter a formula to dynamically create your periods.
    <ChartFormulaParameter Name="Period">
                      <Value>=IIf(Count(Fields!Calls.Value) >= 7 ,7, (Count(Fields!Calls.Value)))</Value>
    </ChartFormulaParameter>
    What I'm doing here is getting the row count of records returned in the chart. If the returned rows are greater than or equal to 7 (The amount of days I want the average) it will set the points to 7. If not, it will set the number to the amount of returned rows. So far this has worked great. I'm probably going to add more code to handle no records returned although in my case that shouldn't happen but, you never know.
    A side note:
    If you open the calculated series properties in the designer, you will notice the number of periods is set to "0". If you change this it will overwrite your custom formula in the XML.

  • Error in creating Formula Variable

    Hi All:
    I'm having problems in creating formula variable. Trying to create FV on a characteristic using replacement path with attribute value , but the wierd part is it's not giving me any attributes it's just blank. Any help would be appreciated....
    Thanks,
    Manasa.

    Right click on the FM, create -> Characteristic -> attribute value -> but the attribute are not showing up.  This happens if the attribute is of key figure type. I was able to do this in another system (ASIA DEV) but now trying in Europe Dev.

  • Error while passing prompt value in Column Formula

    Hi All,
    I have created a dashboard and added a dashboard prompt on that with a presentation variable named "promptdyn" that is basically showing bank names.
    Now i want to calculate the market value based on this prompt selection, so i edited the column formula as
    "WM FACT Sec"."MARKET VALUE" * EVALUATE('getBankBaseCurrencyValue(%2)' As Double,@{promptdyn},"Industry Type".INSTRUMENT_CCY)
    But it is throwing this error:
    \nQSError: 10058] A general error has occurred.
    \nQSError: 22051] The argument number 1 is not referenced in this evaluate expression: getBankBaseCurrencyValue(%2). (HY000)
    SQL Issued: SELECT "Industry Type".INDUSTRY_NAME, "Industry Type".INDUSTRY_TYPE, "WM FACT Sec"."MARKET VALUE" * EVALUATE('getBankBaseCurrencyValue(%2)' As Double,0,"Industry Type".INSTRUMENT_CCY) FROM WMAdHocReportingBMMSec
    I don't know what is wrong here.Here i tried to pass the value of the prompt to the function.
    Basically I have created a function in the database with two parameter as "bank name " and "Currency" and calling it with the help of evaluate function.
    How could we store the prompt value and pass it to some other function?
    Pls help me as it is urgent for me to solve.
    Thanks

    He Solved.
    Just i missed out to write %1,%2 in the evaluate function.
    But one thing i need to know that how can we store the value that is selected in a prompt say in dashboard prompt so that it can be used in query. Because i need to select a value first from the prompt and based on that i need to manipulate the values of the other request of the dashboard.
    Please Reply.
    Thanks

  • Rep-1401: formula name : Fatal Pl/SQL error occured

    Hi,
    I am using report builder 6.0 and recently came across a error while running the report. Rep-1401:<formula name> : Fatal Pl/SQL error occured.
    I created a formula column in the report. In that i have three local variable.
    f_val number := 0;
    s_val number := 0;
    t_val number := 0;
    t_val := f_val/s_val ; --> this gives the above fatal error.
    t_val := (f_val + 1)/s_val; --> this gives the above fatal error
    t_val := f_val/(s_val + 1); ---> no error
    if i change the value of s_val
    s_val := 1;
    t_val := f_val/(s_val - 1) ; ----> this gives the above fatal error.
    Can anyone help me to solve this problem or is it report builder bug.
    Please help me, as i desperately need help.
    Thanks

    Thanks for ur reply.
    I used nvl too, but the same error occurred.
    For the information in my question I by mistake typed
    t_val := (f_val + 1)/s_val; --> this gives the above fatal error.
    but when the value of f_val = zero and s_val is zero why it gives fatal error when i divide, i used nvl on both the variable while dividing but still got the same error.
    but if s_val is greater than zero then no error occurs.
    please help me, I feel it is a bug.

  • Filling in the Blanks - Formula for "specific" fill of blank cells

    I am still in the midst of my super extended spreadsheet project and I have come across one more issue that I am sure has an easy solution (using a formula). What I have is a table like this:
    !http://i142.photobucket.com/albums/r103/foenixfortean/Blanks.jpg!
    What I need is for every blank to be filled with the previous word directly above it so the original file would end up looking like this.
    smooth
    smooth
    tax-free
    public
    public
    fair 1
    fair 1
    part-time
    part-time
    inland
    inland
    another
    another
    another
    another
    agricultural
    cold
    cold
    cold
    cold
    cold
    freezing
    freezing
    I would just do it by hand but seeing as how my spreadsheet has 60000+ entries it would be much nicer to let the computer do the work, right?!? Are there any formula experts out there who might be able to help me come up with one for this? Thanks in advance!!

    You can do this using a simple formula.
    To fill column B, for example, enter this in B2:
    =B1
    Click Accept, then drag the handle at the bottom right of B2 down to fill the rest of column B.
    When you enter data in any cell in column B, the entered date will replace the formula in that cell, and the formulas in the cells below will copy the entered data into every cell below until blocked by the next cell filled with entered data.
    Regards,
    Barry

  • How to find out the user who modified formula

    Hi  Experts,
    How can I find the user ID who modified the formula in transfer rules?
    Thanks
    Manish

    you can check the infosource status, menu - extras - infosource status. there you will find info abt the comm and transfer structure, active and modified version, last changed, date, time etc. I dont think it would work if the structure has been changed after the structure has been changed with the formulas.

Maybe you are looking for