Convert Epoch Date Time to Date Time format

I am trying to convert Epoch Date time in GMT to Human Readable Date time format in UTC. I used the one below but it returns just the date in GMT but how can get datetime in UTC ?
select To_Char( To_Date( '01.01.1970 06:00:00','DD.MM.YYYY HH24:Mi:Ss') + STARTIME / 86400,'DD.MM.YYYY HH24:Mi:ss') FROM HQ_AVAIL_DATA_RLE;
I refered a couple of forums and applied everything, but still I wouldn't get the timestamp.
Please note that i'm looking for datetime stamp, not just the date.
Thanks in advance!
Edited by: 830754 on Jan 27, 2011 11:18 AM
Edited by: 830754 on Jan 27, 2011 11:19 AM

Works for me. I see date and time (submitted 1000 for STARTTIME):
select To_Char( To_Date( '01.01.1970 06:00:00','DD.MM.YYYY HH24:Mi:Ss') + 1000 / 86400,'DD.MM.YYYY HH24:Mi:ss')
from dual
TO_CHAR(TO_DATE('01
01.01.1970 06:16:40Or do you mean something else?

Similar Messages

  • Update date/time in UNIX timestamp format

    The datetime in my Oracle DB is being stored in UNIX Date Time format.
    Is there a way I can set the date/time using an UPDATE statement in such a case.
    for eg:
    select id, creation_date, expiration_date from skel;
    id creation_date expiration_date
    400019 1213726470     
    400020 1213733052     
    400005 1210867973     
    400018 1213723608     
    I am looking to set the expiration date as creation_date + 1 year.
    Could you please advise?

    I am looking to update the value in the field. The values will still be in UNIX date/time format.Yes, but still: instead of continuing converting to Oracle dates and Unix dates, why not just store dates the way the datebase can deal with it the best?
    You're probably storing your UNIX date/time formatted dates in the database as NUMBERS.
    That is a great loss of lots of built-in date functionality Oracle Database provides.
    If you insist on staying on that road, then explore my previous links, you will find your answer:
    Convert epoch number to date, do arithmatic and convert the result back to epoch number.
    That is overkill.
    It won't work/scale/perform/whatever in the end. It is a bad approach.
    So, please reconsider this:
    Why are you storing dates as numbers?
    Convert those numbers to dates once, and be done with it for ever after and benefit from all the builtin date-functionality Oracle database comes with, or convince us that you really have a valid reason to store dates in UNIX date/time format into an Oracle Database.
    and my last date was...uuhhmm... never mind ;)

  • 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

  • Convert util.Date to sql.Date with time being displayed!

    Hi all,
    I want to convert util.Date to sql.Date for passing the same to Database. (i donot want to use Timstamp, for some reasons)
    java.sql.Date sqldate =
    new java.sql.Date(new java.util.Date().getTime());
    This simple code truncates the Time component and the result will be only Date. But my requirement is for Data and Time, both.
    Request anyone to suggest how to go abt this problem.
    Thanx.

    You can use the class java.text.DateFormat (java.text.SimpleDateFormat) for displaying. For example like this.
    java.sql.Date sqldate = new java.sql.Date(new java.util.Date().getTime());
    java.text.SimpleDateFormat formatter = new java.text.SimpleDateFormat("yyyy.MM.dd 'at' HH:mm:ss z");
    String str = formatter.format(sqldate);
    System.out.println(str);

  • Converting unix data to normal date time.

    Post Author: Keshavan
    CA Forum: Formula
    Hi,
    Can anyone help me out on how to convert the unix date time format to normal date time? I should convert this unix data to proper time format also with GMT+5:30 hrs. Please help me to do the same.
    Thanks in advance,
    Keshavan.

    Post Author: V361
    CA Forum: Formula
    Could you provide some samples, I am not sure what a Unix data time looks like.
    Unix date that displays:
    Date you want to display:

  • Why the time and date is not correct when I save a waveform in txt format, using Labview 6.1?

    I am using Labview 6.1 and my operation system is Windows 98. The date/time properties is configured in the Windows (time and date in the control panel is correct). I generated a waveform using Basic Function Generator.vi and saved this using the Export Waveforms to Spreadsheet File.vi. When I opened this file the date and time was wrong. Only the delta t was correct and it did not show the date neither the time, only a float number. How can I adjust the correct time?

    Actually, the date/time is correct, it is expressed as seconds since January 01, 1904.
    In order to print the string version of the date/time from your file, you will need to write a utility that converts the date/time to a string or series of strings in whatever format you wish. This can be done by reading the first line (I assume that is the line with the time on it), formatting the date/time into a string, and writing over this information in the file.
    The waveform VIs were meant to be used internally to read and write waveform data. Any use beyond that should require you to add formatting and other information/data as necessary.

  • Convert  DV-AVI file from the sony camcorder into MPEG2 with time and date

    I want to capture or convert a raw DV-AVI file from the sony camcorder into MPEG2 format...this i want frame by frame conversion and i also want the metadata i.e. time and date to be captured at the same time when the conversion is done....so i want to know that which is the JAVA tool available for that ?
    pls.. kindly reply mi on the emaiID: [email protected] my contact no. is:09869256073
    with regards,
    nilesh hardikar

    I read a whole bunch of random responses to similar questions ... here's some
    Try opening the file in iMovie
    Try changing the filename extension to ".dv"
    Here's an interesting one: http://discussions.apple.com/thread.jspa?messageID=6172027
    But my personal favorite idea is to just re-export the file from a PC in a better supported codec
    (BTW If you don't have access to a PC then you can easily install Bootcamp on your Mac .... you can even download a free prerelease copy of Windows 7 to install on the Bootcamp partition if you're quick)

  • In the advanced tab of languages and Region the time and date formats will not change

    For a certian Application I am using I need to change the format of the Time and Date. I had no problems in Mountain Lion. In the advanced tab of languages and Region the time and date formats will not change. I need the date format to read as 01/01/14 and time format to read 13:00. As I said this was easily done in Mountain Lion and all previous Apple OS. I suspect it's an issue with in the OS.

    You're right, it has been that way for a long time. I've never bothered reporting it as a bug since it's simple enough to deal with, but reporting it would be a reasonable thing to do.

  • Adding time into date format

    Hi
    Is there any easier way to add time value "now" into a date format with time value 00:00
    I managed to add the time
    Value(dateVariable)+(Value(Now())-Value(Today()))
    I just wander if there is any easiest way to do that or if there is any planed options for that?
    Thanks

    Hi Brutton
    I know about this. My scenario is that I use my custom date picker where user can pick a date. For easier date picking I use date format (today) and then adding day ,month or year into that so the date formant is in time 00:00. I
    need to add now time in that date so I can sort entry by date and also by time in a collection I managed to do that with the format mentioned above but I just wander if there is also any other way to do that. We already have excellent code DateAdd where we
    can add days months and years but I can't really add time with this code. I don't think that DateAdd can add time into date format or at least I haven't figure it out yet. If not there would be nice to have A TimeAdd code then instead of calculations

  • How do you convert .AVI files for using in iMovie without losing the original clip time and date

    Hi everyone! does anyone know how to convert .AVI files for using in iMovie without losing the original clip time and date? Handbrake, MPEG Streamclip and Evon all replace the original timecode with the date of modification. This is very frustrating when you are trying to keep the chronology right. I know that if you upload the files to iMovie from one device the chronology isn't a problem, but I'm adding video files from a couple of iPhones and a couple of camcorders. any help much appeciated.
    paul

    Hi everyone! does anyone know how to convert .AVI files for using in iMovie without losing the original clip time and date? Handbrake, MPEG Streamclip and Evon all replace the original timecode with the date of modification. This is very frustrating when you are trying to keep the chronology right. I know that if you upload the files to iMovie from one device the chronology isn't a problem, but I'm adding video files from a couple of iPhones and a couple of camcorders. any help much appeciated.
    paul

  • Convert Safari History lastvisiteddate to date time

    I want to Convert Safari History lastvisiteddate to date time.

    Post Author: newcruser
    CA Forum: Crystal Reports
    Thanks
    This is easy...second group based on the second formula 'for each hour'.
    How you group by 15 minutes?.
    i want to group by every 15 minutes starting from 9 AM to 5 PM.
    First i need to create a time range and then use that time range to group?.  Or any other simple and best way to solve this?. Please help
    How to create time range from 9 AM to 5 PM?

  • I would like to programatically set the "Date Unused" on X Scale formatting for time plots.

    I can use the X Scale formatting on the front panel, but when I change from time to decimal using property nodes the "date" keeps showing up. How can I turn the date feature off so I just see Time in HH:MMS format?

    Disregard. I found the answer. Set the XScale.Format value to 6 (relative Time). feed in total seconds from start of day to the Xo, The reciprocal of data frequency to DeltaX, and set the decimal resolution to 3. This results in a time tagged plot showing just time (no Date).

  • How to convert Epoch time to Datetime (YYYYMMDDHH24MMSS)

    Hi,
    In our Oracle db, Datetime is stored as Epoch time (seconds since january 1st 1970). To get a readable date, I have converted those fields as followed:
    TO_CHAR(TO_DATE('19700101000000', 'YYYYMMDDHH24MISS')+((DATE_FIELDS-18000) /(60*60*24)),'YYYYMMDDHH24MISS')
    Result ex: 20100830135422
    The problem is that the resulting fields are in VARCHAR2 instead of DATE so it causes issues in SAP BW reporting development. BW developpers can manage something to make it eventually work but I would like to correct this at the source if it is possible.
    I have already tried to add another "TO_DATE" function at the beginning of the previous expression but I get a date in "DD-MMM-YY" format as a result even if I have forced another date format.
    Any idea on how I could solve this?
    Thanks a lot
    Pascale

    Ok, there is clearly a disconnect here.
    Oracle stores dates in a DATE datatype. This means that, internally, it will store enough information for a 4 digit year, a month, date, hour in 24 hour time, minute, and second. All that information is stored in the DATE datatype inside the database, but, it's stored in an internal format, that has nothing to do with what it will look like when you print it. When you want to retrieve it, Oracle must have a date format string, so that it knows how to display that information. If you do not provide a date format string via the TO_CHAR() function, Oracle has a parameter called NLS_DATE_FORMAT that provides the default format to use. If you have not set the NLS_DATE_FORMAT, it defaults to DD-MON-YY.
    So, having said all that, what are you actually trying to do?
    You started with this expression:
    TO_CHAR(TO_DATE('19700101000000', 'YYYYMMDDHH24MISS')+((DATE_FIELDS-18000) /(60*60*24)),'YYYYMMDDHH24MISS')How is that expression used? In a SELECT statement? Then you probably want it the way it's written above. In an INSERT statement? If so, then if the datatype of the column you're inserting into is DATE, then you probably need to eliminate that outer TO_CHAR conversion, so that the expression returns a date that can be inserted into DATE column.
    Tell us more about what you want to do, and perhaps we can offer further help.
    -Mark

  • Trying to use labview to analyse analog data from a jump on a force plate and measure peak force (at two points, initial land and 2nd land from jump). Also need to mark the time of flight (time off plate).

    Attached is a file of 3 trials of a drop vertical jump activity onto a force plate.  the subject stands on a platform off the force plate, jumps onto the force place and immediately jumps up as if going for a rebound.  I am able to run this data and obtain a waveform graph with no problems.  however, I need to be able to find the initial contact with the force palte, the peak of the drop, the intial time off the force plate (prior to the jump), the return from the jump and finally the second peak (landing from the jump). 
    I want to calculate the time of flight ( time off the plate and in the air after the intial drop) to calculate juimp height.
    I had someone write me a mathscript for it and it works well, however, I need to do it without mathscript as I do not understand mathscript (nor Labview!!).
    Please help
    Attachments:
    Jose_Index and shift register6.vi ‏130 KB
    NI post.docx ‏365 KB

    OK, but I'm not understanding what you're asking us to do... Are you asking us to explain what the MathScript code is doing? (It's searching the array for the elements when the values are above or below a threshold.) Are you asking someone to convert the whole MathScript code to LabVIEW (we are not a code-writing service), or you just want to be able to calculate the new stuff you want with LabVIEW?
    In the future, please do not post proprietary file formats. Most people do not have Word, or Word 2007 for that matter. Please post text files or PDFs. Thanks.

  • How to convert epoch time to datetime in sql*loader Oracle

    Hello,
    I wan't to question how to convert epoch time to datetime in sql*loader Oracle. I try this script for convert epoch time to datetime in sql*loader, but error:
    Record 1: Rejected - Error on table TEMP_TEST_LANGY, column DATADATA.
    ORA-01722: invalid number
    Record 2: Rejected - Error on table TEMP_TEST_LANGY, column DATADATA.
    ORA-01722: invalid number
    Record 3: Rejected - Error on table TEMP_TEST_LANGY, column DATADATA.
    ORA-01722: invalid number
    This is my loader:
    LOAD DATA INFILE 'C:\Documents and Settings\Administrator\My Documents\XL_EXTRACT_211\load.csv'
    into table TEMP_TEST_LANGY append
    FIELDS TERMINATED BY ','
    TRAILING NULLCOLS
    DATADATA CHAR "TO_DATE('01-JAN-1970','DD-MON-YYYY')+:datadata/86400"
    This is my csv file:
    79314313.7066667
    79314336.2933333
    79314214.3466667
    This is my table:
    CREATE TABLE TEMP_TEST_LANGY
    DATADATA DATE
    Thanks
    Edited by: xoops on Sep 21, 2011 8:56 AM
    Edited by: xoops on Sep 21, 2011 8:58 AM

    thanks for your answer, but I asked to use sql loader instead of the external table, which so my question is why can not the epochtime converted to datetime, if there is no way to convert a datetime epochtime using sql loader, so I'm required to use the external table. thank you.
    This is my error log:
    Column Name Position Len Term Encl Datatype
    DATADATA FIRST * , CHARACTER
    SQL string for column : "TO_DATE('1-Jan-1970 00:00:00','dd-MM-YYYY hh24:mi:ss') + (:DATADATA/60/60/24)"
    Record 1: Rejected - Error on table TEMP_TEST_LANGY, column DATADATA.
    ORA-01722: invalid number
    Record 2: Rejected - Error on table TEMP_TEST_LANGY, column DATADATA.
    ORA-01722: invalid number
    Record 3: Rejected - Error on table TEMP_TEST_LANGY, column DATADATA.
    ORA-01722: invalid number
    Edited by: xoops on Sep 21, 2011 12:33 PM

Maybe you are looking for

  • Client UI design-time error in 9.0.2.829

    I'm getting errors in the UI Editor's log window while designing an application. It has occurred in two distinct situations so far: 1. After placing a JScrollPane in a container, set the horizontalScrollBarPolicy property to HORIZONTAL_SCROLLBAR_NEVE

  • Consignment and GOAs / SRM

    Dear all, I am looking for some insights into your experiance with Consignment driven Processes in SRM / R/3. E.g. there are no technical issues using consignment items in GOAs and distribute the GOA into R/3. But from pricing perspective, the price

  • Light sizzle in the top left of the keyboard in MBA 13" 2010

    Hello, My new MBA 13" (4Go, 1,86Ghz, 128Go) make a very light sizzle in the top left of the keyboard. I think this is the fan's noise because the sizzle stops when I turn off the computer and it starts again when I turn it on. Do you hear the same no

  • OOPS text example Doubt

    Hi , I am training on OOPS which one of the concept is really trouble-shooting to understand. In the class ...CL_SEND_BCS_EXAMPLE.... There is one Method called ASYNCHRONUS. When i am chekcing the code inside the mehtod it has written as TRY. RAISE E

  • EDI Invoicing - Document contains same order item more than once

    Hi, While trying to post an inventory invoice with EDI, we are receiving the following error message: Document contains same order item more than once. On the PO and the inter-company invoice, the same material come more then 1 time. Can you please t