Converting EPOCH time stamp to time stamp in Oracle
Hi,
I need a help regarding how to convert the epoch Time stamp, to oracle date and time format.
for example,
for epoch time stamp:1204104116656
the time stamp should be :2008-02-13 12:43:00.351
Thanks in Advance
Basil Abraham
Are you sure you've got the right timestamp? Assuming this is a standard unix epoch time stamp with the epoch date starting at 1970-01-01 UTC the interval between 1970-01-01 UTC and 2008-02-13 is 13922 days, but your epoch timestamp divided by the number of miliseconds in a day 1204104116656/(1000*60*60*24) comes out to 13936.390... days a difference of 14 days 9 hours 21 minutes 56 seconds and 656 miliseconds.
Anyway to convert you need to convert your epoch date into an interval and add it to the starting epoch date (as a timestamp):
select to_timestamp_tz('1970-01-01 utc', 'yyyy-mm-dd tzr')+
numtodsinterval(1204104116656/1000,'second') dstamp
from dual;Message was edited by:
Sentinel
Similar Messages
-
How to convert time stamp to time in update rule
Anybody know how to convert time stamp to time only? Any FM that I can use?
time stamp example
20010203100201
Result:
10:02:01
Thank
SudreePlease search the forum
-
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 AMWorks 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? -
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 AMthanks 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 -
"Time stamp, Response time and Completion time" in CRM_DNO_MONITOR
Hi,
We have configured Service desk functionality in Solution Manager 4.0.
In CRM_DNO_MONITOR we were able to see all the data except "Time stamp(0), Response time(00:00:00) and Completion time(00:00:00)" of Service desk message.
Kindly let us know, how to configure so that "Time stamp, Response time and Completion time" should be displayed in CRM_DNO_MONITOR.
Best regards,
BhaskarHi,
Do u want this for SLA?
In the service desk you have to assign the date profile to the SLFN transaction type.
For this you can use the standard date profile SLFN_HEADER.
award point if it helps you.
regards,
mahantesh -
GetSelectedFields() for time stamp and user stamp using java api
using Java API's
getSelectedFields() returns NULL value if values presented also, for Time stamp and User stamp
properties in Flat tables , is there any other alternative way to get the SelectedFields values ?
Edited by: Vijaya Sekhar Reddy Alla on Mar 19, 2008 3:16 PMWell, I can't say I solved the problem, because I got another one afterwards.
As usually I created a GetFieldListCommand, set its needed attributes and executed it. Then I read all the field properties out:
FieldProperties[] fieldProp = getFieldListCommand.getFields();
Afterwards it is possible to do what you want. Using a for-loop.
for (FieldProperties fp : fieldProperties) {
UserStampFieldProperties usfp = (UserStampFieldProperties) fp; // <= Cast error
FieldId[] fieldIDs = usfp.getSelectedFields();
And this is what I get now:
Exception in thread "main" java.lang.ClassCastException: com.sap.mdm.schema.fields.FixedWidthTextFieldProperties cannot be cast to com.sap.mdm.schema.fields.UserStampFieldProperties
Why this happens, I don't know. But it should somehow be solveable. -
Hello,
How can I stamp date&time on my photos which taken by my iphone 4
Regards
YasserEasy - if it is on the photo and you can see it then it is on the photo and
You can not [remove it] - you can sort of obscure it using the retouch in iPhoto and if you have PhotoShop or PhotoShop elements the clone tool will do a better job
It is part of the photo and there is nothind "behind" it to show - in the future do not set your camera to include it
The EXIF data ia internal to the photo and is never shown on the photo - it can ony be seen using special software that understands it and then it is displayed seperate form the photo never on the photo - like the info pane in iPhoto which shows selected EXIF information
LN -
How can I convert multiple files at one time and not one at a time
How can I convert multiple files at one time and not one at a time
Hi Plissey1950,
Sorry for the lengthy delay to a response. Are you trying to convert multiple files to individual PDF files at the same time? (not combine them). If so, you'll need to use Adobe Acrobat for this function. The CreatePDF service does not have the ability to convert multiple files to multiple individual PDF files.
Thanks,
David -
How can I make a pdf book (single pdf file with several pages) with "camera to pdf" option on phone? I can only convert one pic at a time. ( Or )how can I attach all those pictures converted pdf's into one pdf file which obviously results in to a single pdf file with several pages in it ?
Adobe Reader on the iPhone is a PDF reading app. It's not a creation app.
You need to get an app like Pages which is intended for page layout. It can place pictures from the phone and export PDF. -
Need function module to convert system time to local time
Hi Experts,
Need function module to convert system time to local time.
i.e country specific that to in HH:MM format.
Thanks in advance.Dear Prince,
Kindly check the following link which contains the list of function modules for date and time conversion.
[http://www.sap-img.com/abap/date-month-pop-related-function-modules.htm]
Regards -
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,
ArvinthTimestamps 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 -
I have a mac book OSX 10.6.8. I didn't convert my mobileme account in time. Is there anyway to back up my computer to icloud with this version?
I have read that Snow Leopard isn't support by Icloud. I am thinking of upgrading to Maverick, but first need to back up my computer.
Also, if I upgrade, will my programs such as the Adobe Creative Suite stay on my computer?You cannot back up your Mac to iCloud; and you cannot use most of iCloud's facilities with Snow Leopard. You should get an external hard disk and make a clone - that's the safest possible backup as you can boot from it in an emergency.
You will need to check that your Mac meets the requirements for Mavericks:
OS X v10.6.8 or later
2GB of memory
8GB of available space
and the supported models are:
iMac (Mid 2007 or newer)
MacBook (Late 2008 Aluminum, or Early 2009 or newer)
MacBook Pro (Mid/Late 2007 or newer)
Xserve (Early 2009)
MacBook Air (Late 2008 or newer)
Mac mini (Early 2009 or newer)
Mac Pro (Early 2008 or newer)
Programs already on your Mac will stay on your Mac but you should be aware that PPC programs (such as AppleWorks) will not run on Lion or above; and some other applications may not be compatible and need updating - there is a useful compatibility checklist at http://roaringapps.com/apps:table -
i have a string 2012-05-22T23:23:42.263-07:00. so i want to convert in date with indian time zone can any one help me out
What does this have to do with iPhone tech support?
-
How do you convert several videos at a time?
how do you convert several videos at a time in itunes or whereever you can convert several at a time? because videora doesnt really work for me.
exactly what the subject says:
how do you convert several videos at a time in itunes
because i have a very slow computer so it takes over
and hour then right before its done it freezes. im
getting really mad because i downloaded videos and
now i cant figure out how to put them on my ipod.
Select all the videos you want to convert, right-click and select "Convert Selection for iPod".
You were using external software last time you were here. -
how do I convert .m4v to Apple Quick-Time 5, 6, and 7 (.mov, .qt)?? Thanks!
I once had a problem with a media player not handling .m4v files correctly. Simply changing the extension to .mov fixed the problem. Just delete the "4" and replace it with an "o". Ignore the warning that may appear regarding changing the file type - in fact it's preferable that you make a copy of the .m4v file beforehand.
There's no guarantee that this will help with your particular issue, but worth a try!
John -
Help with converting hex to date and time
Hi!
I am using snmp4j libraries to walk the mib tree. The system date is getting returned in 11 hexadecimal octets. I require help in converting it to date and time. I looked up the RFC convention of what each octets represent. Require help with conversion.
Eg: 07:db:06:0a:29:1d:00:2b:05:1e
Thanks,Octets Contents Range
1-2 year 0..65536
3 month 1..12
4 day 1..31
5 hour 0..23
6 minutes 0..59
7 seconds 0..60
(use 60 for leap-second)
8 deci-seconds 0..9
9 direction from UTC '+' / '-'
10 hours from UTC 0..13
11 minutes from UTC 0..59
For example I just took the time an hour ago it came out as
07:db:06:13:12:11:1a:00:2b:05:1e
I have to convert this as a date long value to send it.
Do I have to write an utility of my own to do it?
Maybe you are looking for
-
"Operation could not be completed. (OSStatus error -6602.)"
What is this error about? I am trying to use the seagate at home backup harddrive and when i try to back it up to my time machine i get this message "Operation could not be completed. (OSStatus error -6602.)" what do i do?
-
Ipod is downloading my game but not showing up in itunes or letting me play
Hi, I have 5th gen ipod and i am running 1.2 of the software I bought Texas hold'em. When i sync my games it says it is updating but when it is finished it doesnt show up and i am unable to play. Can someone please tell me how to fix this ?
-
So I'm working on my first java based game to work on my basic gui skills. I'm want it so that when the up key is pushed a shot is fired (just a circle). I'm not sure how to approach it though, whether to use graphics2d to create a fillarc and make i
-
please i want to remove the old version of itune, the new version does not delete it for some reason , what i should do?
-
Window priority -- opens behind current application -- help
Hi. I've had a mac for a few months now, but I think I've broken something. I have a vague recollection of changing some sort of windows compositor thing by following instructions on a site somewhere. The problem that I'm having now is that windows a