Convert UNIX timestamp in a report in Report Builder

Hi,
I have a column with unix timestamp (i.e 1386782654 ).
How can I make that conversion to a dateformat  like 2013-03-05 17:32 ?
I have tried =DateAdd("s", Fields!timestamp.Value, "19700101 00:00:00:000") but it just gives me an error.
Anyone knows how to get this right?

I solved it myself,
The correct expression is: =DateAdd("s", Fields!timestamp.Value,"1970-01-01 00:00:00")

Similar Messages

  • Convert Unix timestamp to LabVIEW time

    Hello
    I need to convert a Unix timestamp comming froma dll to a LabVIEW time. Does anybody now some ready to use function for this?
    Thanks
    Solved!
    Go to Solution.

    DAckermann wrote:
    Oh yes. That was easy.
    Thank you very much!
    Exceot that there is a small possible gotcha. If you enter 1/1/1970 in a LabVIEW timestamp control and convert this to a double to get the number of seconds you likely end up with an error of your local timezone offset.
    Both the Unix and LabVIEW epoch are defined respective to GMT which for most practical purposes is the same as UTC. So you have to make sure to get the number of seconds for a timestamp that shows 1/1/1970 00:00 UTC to be right.
    Spoiler (Highlight to read)
    If you ended up with 2082844800 as offset then you got it right.
    If you ended up with 2082844800 as offset then you got it right.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Select entries between two dates by converting Unix timestamp in Oracle Dat

    Hi,
    I need to select the entries between two dates from an Oracle db. The Oracle db has a column with Unix timestamps. I use the following querry, but it doesnt seem to be working as desired.
    select count(*) from reporter_status where to_char(FIRSTOCCURRENCE, 'mm-dd-yy') between ('08-07-06') and ('08-08-06');
    FIRSTOCCURRENCE has the Unix timestamps.
    Could anyone help me out with this. Thank you for your help.

    Assuming that it is actually a UNIX timestamp, then it is the number of seconds since Jan 1, 1970, so you need something like:
    SELECT COUNT(*)
    FROM reporter_status
    WHERE TO_DATE('01-Jan-1970', 'dd-mon-yyyy') + (firstoccurrence/24/60/60)
                    BETWEEN TO_DATE('08-07-2006', 'mm-dd-yyyy') AND
                            TO_DATE('08-08-2006, 'mm-dd-yyyy');Did Y2K not teach us anything? Use 4 digit years.
    John

  • Convert Unix timestamp to Readable Date/time

    Hello.
    I'm reading a database with the time field expressed in Unix Time (number of seconds since 1/1/1970 00:00).
    Is there any fast way to convert it to "mm-dd-yyyy hh:mm:ss" ?
    Regards.

    Try something like this:
    DateFormat shortTime = DateFormat.getTimeInstance(DateFormat.LONG);
    String theTime = shortTime.format(new java.util.Date());
    DateFormat shortDate = DateFormat.getDateInstance(DateFormat.MEDIUM);
    String theDate = shortDate.format(new java.util.Date());
    System.out.println("The formatted date is: " + theDate + " and the formatted time is: " + theTime);Check out the static fields in the DateFormat class for the different formatting options.
    Hope that helps!
    - Sheepy

  • Converting unix timestamp to date after Daylight Saving Time change

    Hello,
    in one of the products we use the internal scheduler stores dates (and times) in an Unix-like format, that is seconds since 1st of January 1970. We have used this SQL to extract the actual date:
    TO_CHAR(t.next_fire_time/(24*60*60*1000) +to_date('19700101020000','yyyymmddhh24miss'),'yyyymmddhh24miss')
    Everything worked fine until the time has changed this weekend from UTC+2 to UTC+1 (we are located in Eastern Europe). Since then the query above returns one hour later than it should.
    I.e. timestamp *1320067800000* is returned as *20111031153000* even thought correct is (and the actual time the event was scheduled) *31-OCT-11 02.30.16.000000 PM*
    I found queries like this on different forums and no one seems to worry much about the daylight savings. Is this a configuration issue in the DB or is it a bug in our code?
    I tried selecting the SESSIONTIMEZONE and DBTIMEZONE and both were +1.
    Any help appreciated.

    Your problem is hard-coded 2hour offset:
    to_date('19700101<font size=5 color=red>02</font>0000','yyyymmddhh24miss')You need to calculate current offset to adjust it to current DST situation:
    with sample_table as (
                          select date '1970-01-01' + 1320067800000 / 1000 / 3600 / 24 dt_utc from dual
    select  dt_utc,
            dt_utc +
            extract(
                         timezone_hour
                    from
                         from_tz(cast(dt_utc as timestamp),'utc') at time zone 'Europe/Prague'
                   ) / 24 dt_prague,
            extract(
                         timezone_hour
                    from
                         from_tz(cast(dt_utc as timestamp),'utc') at time zone 'Europe/Prague'
                   ) tz_offset
      from  sample_table
    DT_UTC              DT_PRAGUE            TZ_OFFSET
    2011-10-31 13:30:00 2011-10-31 14:30:00          1
    SQL> SY.

  • Unix timestamp in cfgrid

    Sometime ago I produced a php and SQL jobsite. Users apply
    for jobs and the date they apply is converted into a unix timestamp
    and inserted into the SQL as an integer.
    I am now using coldfusion increasingly more, and am wanting
    to display the results above using a cfgrid.
    Although I have found similar posts in this forum I still
    have two oustanding queries:
    1) How do I catch the date for each row before the cfgrid
    displays it
    2) How to convert unix timestamp using coldfusion

    chilliroom wrote:
    >
    quote:
    format it via the db is probably the cheapest.
    > I am still unsure how to catch the date for each row
    before the cfgrd grabs it.
    what db? does it have this functionality? for sql server
    something like should
    work (but again watch for overflow):
    SELECT
    dateAdd(second,yourUnixEpochOffsetDataColumn,'1-jan-1970') as
    aDate,....
    FROM yourTable
    > How can I extract this value to then feed into
    "yourUnixEpochOffsetData".
    if your db can't handle this, here's one way using cf (but
    the db is cheaper).
    do your normal cfquery then:
    - convert the unix epoch offsets to datetimes:
    unixEpoch=createDate(1970,1,1);
    newDates=arrayNew(1);
    for (i=1; i LTE yourRegularcfQuery.recordCount;i=i+1) {
    newDates
    =dateAdd("s",yourRegularcfQuery.yourUnixEpochOffsetDataColumn,unixEpoch);
    depending on your needs, you might also want to dateFormat
    the results of the
    dataAdd:
    newDates
    =dateFormat(dateAdd("s",yourRegularcfQuery.yourUnixEpochOffsetDataColumn,unixEpoch));
    - add a column to your cfquery & fill with those
    converted dates,
    queryAddColumn(yourRegularcfQuery,"aDate","date",newDates);

  • UNIX Timestamp

    Hello
    How do I convert UNIX timestamp to Oracle
    Thanks
    Sameer

    hi,
    Write a Shell script which will pass the date to the procedure as a Parameter.
    Example.
    dt=`date`
    echo $dt
    sqlplus /nolog < scott/tiger 2>/dev/null <!EOF
    begin
    convertDate('$dt');
    end;
    !EOFThe Procedure.
    Create Or replace function convertDate(dt in Varchar2) return Date
    As
    convertDt Date;
    Begin
    -- Assuming that the Dt is 'Mon 3 Sep 2001 14:00:45'
    select to_date(dt, 'Dy DD Mon YYYY hh24:MI:SS') into convertDt from dual;
    return convertDt;
    End;Since i dont have a Unix Mac u will have to tweak the Shell Script on the Redirection Symbols.
    Oracle Does not support Timezones ... If u need to Incorportae TZ then pls look into a Java Solutiion.
    Hope this helps.
    Regards,
    Ganesh R

  • How can i convert the firefox-history-timestamp in places.sqlite into a normal date format? The firefox-timestamp is not equivalent to the unix-timestamp, that's why I ask. I could not find a conversion function. Does anyone know something about this?

    As I opened the places.sqlite with an sqlite-editor I found out that firefox saves the last_visit_date via a timestamp which is 16 digits long. I realized that the first 10 digits are similar to the corresponding unix-timestamp but not equal. So.. how can i convert the firefox-timestamp into a normal date? Or into the corresponding unix-timestamp?

    Write a bash script or 'C' program to change the date format and then use the sql update function to receive the stdio output 'where date_field='embeded date value'.

  • Convert Report Writer Report to ABAP Report

    Hi,
    does anyone know if there is an easy way to kind of export a report writer report to a abap programm, that can then be changed or enhanced?
    ths in advance.

    Hi!
    Fortunately report writer programs are ABAP programs. You can figure out their names in the following way:
    GR55 - Enter the name of the report group, you wanted to modify - press F8.
    On the selection screen choose Environment - Technical data, you'll see the program names here.
    They seem like this:
    GPCV74T2WBUPA9V6K6M86563YM7040
    GPCXBUYEUX830Y0CQQTVVO0FLRZ040
    GPCZGL3QTILGRM5IXB1JL6UR8XR040
    GPCT2ENQXQHBJLQ0DMEKGMBSBGF040
    Simply copy them... But don't forget, after you copy the report, all change in the GR55 will not get into the copyed programs.
    Regards
    Tamá

  • Unix Timestamp & Formula

    Post Author: eskimo42
    CA Forum: Formula
    I have an ecommerce DB which I am trying to report on using Crystal
    Reports 2008. Please bear with me, this is my first time using Crystal
    Reports. Here is my issue: The
    order creation date field in the eCommerce DB is being pulled as a Unix
    Timestamp. After some research online I have found that this formula
    should help me convert the timestamps into a readable format:DateAdd (u201Dsu201D,{jos_vm_orders1.cdate}-18000, #1/1/1970#)So
    I have created numerous formula fields, Formatting Formulas, Custom
    Functions, and all I can seem to come up with is this error:The ) is missing. I
    really hope someone can walk me through how exactly I can convert a DB
    field which appears in a report to, a readable time stamp with that
    formula I have above. Thanks,Evan

    Post Author: bettername
    CA Forum: Formula
    Glad that worked!
    Since Crystal doesn't support UnixTimeStamp<->DateTime conversion (c'mon guys!), you're going to have to write a formula for each field that you want to display that uses a Timestamp field (boring, yes!), and drag each of the formulas onto the page.  I sure hope I'm missing something there...
    You could create a custom function to save some typing - have a look at http://publib.boulder.ibm.com/infocenter/radhelp/v6r0m1/index.jsp?topic=/com.businessobjects.integration.eclipse.doc.crdesigner/reportdesigner/crconcustomfunctions.htm, but essentially the code is:
    Function (numbervar UnixTimeStamp)DateAdd ("s",UnixTimeStamp-18000, date(1970,01,01))
    That way, each time you want to convert a field, you just type a formula that says "UnixToDateTime ({yourTable.YourField})"
    I think you know where to create a formula (View - Field Explorer).  Once you've created the formula, drop it in the details section, then goto 'Insert' - 'Group', choose the formula and the rest should be obvious...

  • Issues in Report Painter Reports

    Dear All,
    We are on ECC 6.0. We are using some Report Painter Reports and we are facing the following 2 issues:
    1. Authorization
    For some of the Profitability Reports, we are facing authorization issues. e.g. If I do not need a user to view the profitiability of a particular Business Area to which he does not belong to then I should be able to restrict the same via authorization. However, I do not know where to maintain such authorization objects in Report Painter Reports
    2. Financial Statement Version
    We have created a Cash Flow Statement by using the Report Painter. We have created a Form whereby we have assigned GL Accounts to some characteristics and Financial Statement Version Item to others. However, when we execute the report, we can see figures for only those items where we assigned the GL Accounts and not for those items where we assigned FSV Items.
    Thanks,
    Shalin Shah

    Hi,
    1: search SAPNET with search terms "report painter, authorization", guess you find some useful notes.
    2: Try T-code KE5B to convert Financial Statement Verison sets to sets that can be used in report painter.
    Best regards, Christian

  • Report painter report in portal - Excel output in SAP GUI for HTML

    Dear sirs,
    I need your expertize. I would like to let my users display (Excel in place)/ save the result of my report painter reports into MS Excel. I have found notes 499262 a 314568, but didn´t understand the message (or there is no message:)). Does that mean I cannot use Excel in place together with Report painter and SAP GUI for HTML?
    Second question: is there a place (user exit in generated code? I don´t even know what I am looking for) to get the data provided by the report painter engine and send the retrieved data to some custom function (to be able to call the Adobe form, to save it as a text file or any option how to manipulate the resulting data...?).
    thank you for your time and effort,
    regards Otto

    Hi Otto,
    You can send print the report to the spool and then use RSTXPDFT4 program to convert this spool to PDF file. Alternatively, you can export the spool to spreadsheet or ASCII file via SP01 transaction.
    Additinally, I'm not aware of unability to use Excel output with SAP GUI interface.
    Regards,
    Eli

  • NVision report through Report Book generating special characters

    Problem generating nVision Tabular report using Report Book. Reports brings special characters on two tabs after half way down the report. When we run the same report through two-tier mode it comes out clean. Tested the production and test layouts, they both bring the special characters. Running Peoplesoft Application 8.8, People Tools 8.45, MS office 2000 SR-1 Professional (both on server and the client computer.
    Appreciate any input on this case.

    Hi,
    Developer 6i does not support PDF subset (that is the easiest way to achieve this). In 6i you can try the following approach.
    Reference
    How to print Turkish correctly in UNIX Oracle Reports in PDF format? (Doc ID 146596.1)
    Regards, Roberto

  • Error in running Reports  in Report Bulider 9i

    Whenever I try to run a report in Reports Builder (9i) , I get the following error message.
    REP-0069 Internal error
    REP-58102 error sending the request "http://hostname:3000/rwWarmUp.jsp to internal web server "java.net.connectException:Connection Refused connect "
    Cannot anybody suggest that what can be the reason for this ?
    Regards and Thanx in Advance.

    Hi,
    In which OS you are running ?
    If it is Unix go to REPORTS_TMP (env variable) directory and there should be a directory called "docroot". See whether you have sufficient permissions to write to that directory. Better , delete everything under the dir and that directory itself and try again
    In Windows see whether this directory is a valid one. (This var is in registry HKLM\software\oracle\home<x>)
    See whether by any chance that port is being used by any other application.
    Thanks
    Ratheesh

  • VI to convert Unix time to standard time?

    hi,
    I am in need of a VI to convert Unix time to Standard time?
    eg: Unix time: 1268845177 in seconds
    Standard time: GMT: Wed, 17 Mar 2010 16:59:37 GMT
                            Your timezone(U.S):
    Wednesday, March 17, 2010 10:59:37 AM
    I have the calculation but not full formula.
    Unix time is in seconds from Jan 1,1970, 00:00:00 UTC, starting at 0 counting forward.
    When 1268845177/86400 = 14685 days.
    86400 = 60*60*24 seconds
    But how to convert the 14685 days and relate to the current date, how it should be done?
    Either the formula or a VI to convert Unix time to standard time will be a help.
    Regards,
    Arvinth

    Timestamps and the PC clock vs. time on the net are different and I'd say somewhat unrelated concepts.
    You are worried about accuracy of the current time.  Timestamps have nothing to do with current time, but are a way of identifying and particular moment in time.
    Yes, the PC clock gets its time from the net assuming the time server settings are all set properly.  Even the correction of the current PC time may not happen exactly when the leap second gets inserted.  It may be some time before the PC resynchronizes with the net time.  The PC doesn't know if the existence of when a leap second will occur.  And neither does the LabVIEW timestamp.
    Here is an example.  According to http://en.wikipedia.org/wiki/Leap_second, a leap second will occur at the end of June 30 of this year UTC.  Since my clock is eastern daylight time at that date, I put together an example for 8pm on June 30  (UTC +4).  You'll see that the 3 values (a second before, the exact time, and a second after) show they are all 1 second apart.  There is no extra second accounted for.  So in real life the time a second after  vs. a second before are actually 3 seconds apart, but LabVIEW only show 2 seconds.  Feel free to play with the attached snippet for different timezones and daylight savings time and all of that.
    I don't think you really have as big of a problem as you are trying to investigate here.  If your timing needs are that critical where you need accuracy of the current time to better than a second, then you shouldn't be looking at LabVIEW timestamps, PC time clock, or internet time at all, but look at a high accuracy timing source perhaps based on a GPS clock.
    Unless you have a particular test planned to run over the expected point of time where a leap second is inserted, then you shouldn't have to worry.  Even if you do have a test run over the leap second, you probably don't need to worry either.  If the test is based on a waveform datatype, then you have a T0 timestamp, and a dT that will keep track of all the individual data points accurately.
    Attachments:
    Example_VI.png ‏20 KB

Maybe you are looking for