Convert epoc time format

anyone know how to format a epoc time format to a normal time
string?
I am new so i am praying there is some actionscript function
that does this....

hi ,
try out this , but not sure
data: number type f value '2,980000000000000+04',
      time type syuzeit.
move number to time.
write time.

Similar Messages

  • How convert date/time from xml in xdp(Designer)?

    Hi, i want to convert date/time format from xml in Designer, date/time value in xml is NOT in common format YYYY-MM-DD (if is in a common format i can do this with pattern)
    I have a "DateTime" Field in Xdp can get from Xml date and time:
    In XML <DateTime>DD-MM-YYYY</DateTime> i want to convert in XDP in DateTime Field in "DD-April-YYYY"
    Can i do this?

    You can do this way..
    Bind the date field to your XML tag.
    Set the display pattern for the date field.
    In the initialize event of the date field place the following code.
    Set JavaScript as language.
    var dtStr = this.rawValue;
    var pos1=dtStr.indexOf("-");
    var pos2=dtStr.indexOf("-",pos1+1);
    var strMonth=dtStr.substring(0,pos1);
    var strDay=dtStr.substring(pos1+1,pos2);
    var strYear=dtStr.substring(pos2+1);
    //Assign the formatted value to the Date field.
    this.rawValue = strYear + "-" + strMonth + "-" + strDay;
    Thanks
    Srini

  • Change decimal format to time format ie 1.5 to 1:30

    Hi I need to create a field such that when you enter a value in decimal format it gets converted to time format.
    Eg change 1.5 to 1.3 ..... Can any one help cheers.... any light on how to do this would be much appreciated.

    create table num_to_time (seq number, val number, dtvl date);
    insert into num_to_time
    select 1 seq, 1.5 val, null dtvl from dual
    union all
    select 2, 2.25, null from dual;
    commit;
    create or replace procedure p_numtotime is
    v_seq num_to_time.seq%type;
    v_val num_to_time.val%type;
    v_date num_to_time.dtvl%type;
    cursor c1 is select * from num_to_time;
    begin
    open c1;
    loop
    fetch c1 into v_seq,v_val,v_date;
    exit when c1%notfound;
    update num_to_time set
    dtvl = to_date(to_char(trunc(sysdate)) ||
    ' 0'||trunc(v_val)||':'||to_char(mod(v_val,trunc(v_val))*60)||':00',
    'dd/mm/yyyy hh24:mi:ss')
    where seq = v_seq;
    end loop;
    commit;
    close c1;
    end;
    exec p_numtotime;
    drop table num_to_time;
    drop procedure p_numtotime;

  • TIME format conversion

    Hi
    Please help me out
    I have data
    Input = 2.00+e4 ( Exponential Form)
    i want out put = 20:00:00 ( time format)
    how to do this? any function module ???
    regards
    aryan

    Hi,
      When we assign a floating point number to a field of type T
    then the floating point number is converted into Packed number (As no. of Seconds) and then the Packed number is converted to time format(HH:MM:SS).
      data:
      w_float  type f,
      w_time   like sy-uzeit.
    w_float = '2.00+e4' .
    w_time  = w_float.
    write w_time.
    output :
      00:00:02.
    I think this will help you

  • Decimal format time value to convert into time (hr:min:sec)value in a graph

    I need to develop a graph in WAD, in BW7. In the graph the value must be showed as HR:MIN:SEC, which I cannot get it right.
    The keyfigure value  carries the duration(hr:min:sec) in decimal format.  In the query, I use this keyfigure for calculation. To get the time broadcasted for a week range. I get the total duration (say 507835.000). Now I need to convert this value back to hr:min:sec. I use the below formulas to get the hr, min, sec.
    D = 507835
    Val1 = D/3600
    Val2 = Frac(val1)
    Val3 = Val2 * 60
    Val4 = frac(Val3) * 60
    Hr = Val1 – Val2
    Min =  Val3 – frac(Val3)
    Sec =  Val4
    In another formula in the query I add Hr + Min/100 + Sec/10000 to get hr.minsec format.
    When I do an average on count of weeks,  this doesn’t round off correctly.
    I tried to also use the Data function TIME() which when the time is > 24 hrs changes the value.
    Lets say if it is 39:00:00, it shows value as 15:00:00 instead of keeping the value 39:00:00.
    When I used this value in the graph it did not show the HR:MIN:SEC values in the value axis instead  it showed 0.0, 0.1,….1.0. Bcoz of this the graph is blank.
    Can anybody help me to resolve this problem.
    Thanks alot
    Anima

    I checked SU01 and didn't see anything there to customize...
    In my workstation, control panel / regional and languages settings / tab regional Options / customize; my time format is HH:mm:ss; the HH has to be in capital letter to display the time in 24 hour...
    but this is strange anyway... are you reporting with web frontend or excel?

  • 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?

  • How to convert 12 hour time format to 24 hour time format ?

    Hi,
    How to convert 12 hour time format to 24 hour time format is there any FM if not, please suggest me how to convert .
    regards,
    rakesh

    Hi,
    Have you tried function module HRVE_CONVERT_TIME
    Input parameters will be like
    TYPE_TIME                       B
    INPUT_TIME                      01:00:00
    INPUT_AM_PM                  PM
    Output
    OUTPUT_TIME                     13:00:00
    Regards

  • Converting to UTC time format

    Hi ,
          I would like to convert the time retrieved from the database to UTC format. Do you have any idea how this possible in MII?
    Is there any inbuilt method in MII for doing this
    Thanks
    Shaji

    Hello Shaji,
    in my opinion a real time zone conversion cannot be achieved by using the MII functions and standard actions. I wrote my own MII action. It looks something like this:
    private static final String DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss";
    @Action(name = "TimeZoneConverter")
    @Outputs(names = { "OutputDate" }, types = { VariantDataTypes.STRING })
    public boolean run(IActionInstance action,
      @Input(name = "InputTimeZone") String inputTimeZone,
      @Input(name = "InputDate") String inputDate,
      @Input(name = "OutputTimeZone") String outputTimeZone)
      throws InvalidVariableException, DataConversionException {
      SimpleDateFormat inputDateFormat = new SimpleDateFormat(DATE_FORMAT);
      inputDateFormat.setTimeZone(TimeZone.getTimeZone(inputTimeZone));
      Date date = inputDateFormat.parse(inputDate);
      SimpleDateFormat outputDateFormat = new SimpleDateFormat(DATE_FORMAT);
      outputDateFormat.setLenient(true);
      outputDateFormat.setTimeZone(TimeZone.getTimeZone(outputTimeZone));
      action.setActionResult("OutputDate", outputDateFormat.format(date));
      return true;
    Regards,
    Martin

  • Converting zulu format to date and time format

    I want to convert zulu format to regular dateand time format. so for e.g I have this date and time in my table
    021731ZJUN06, I want to convert it to 2006-06-02 17:31:00
    I wrote this in sql server, but don't know how to do this in oracle
    ALTER function [dbo].[ZULUToDateTime](@initDate varchar(20))
    RETURNS datetime
    AS
    BEGIN
    DECLARE @NewDate datetime
    SET @NewDate = NULL
    IF @initDate <> 'false'
    BEGIN
         SET @NewDate=     CONVERT(datetime,LEFT(@initDate,2)+ ' ' + STUFF(right(@initDate,5),4,0,' ') + ' ' +STUFF(SUBSTRING(@initDate,3,4),3,0,':'),121)  
    END
    RETURN @NewDate
    END

    Like this?
    SQL> select to_date('021731ZJUN06', 'ddhh24mi"z"monrr')
      2  from dual;
    TO_DATE('021731ZJUN0
    02-jun-2006 17:31:00Gotta love Oracle's date formatting fuctions :-)
    The format above is my default session format, if you explicitly want the format you showed, you need an extra to_char like:
    SQL> select TO_CHAR(to_date('021731ZJUN06', 'ddhh24mi"z"monrr'), 'yyyy-mm-dd hh24:mi:ss')
      2  from dual;
    TO_CHAR(TO_DATE('021
    2006-06-02 17:31:00John
    Edited by: John Spencer on Nov 10, 2011 1:45 PM
    Added correct output format.

  • Convert channel display format from time to numeric in a script

    I am trying to convert the Display format of a channel that contains time values (mm/dd/yyyy hh:nn:ss.ffff) from Time to Numeric. I know I can do this in the properties section of the data portal but I would like to do it in a script. I want to be able to automatically convert it without having to manually do it each time I import new data. What syntax is needed for this? 
    I've already tried the ChnPropSet (and ChnPropValSet) commands but it doesn't change the Display format after I run the script. Thanks for all your help. 
    Solved!
    Go to Solution.

    Hi Steinmeister,
    i've found a way. You can use the "ChnCalculate"-Function but you must store it to a new channel.
    Dim oGrp, oChn
    Dim sChn
    'iterate over all channels
    For Each oGrp In Data.Root.ChannelGroups
    For Each oChn In oGrp.Channels
    sChn = transformTimeChnToNum(oChn)
    If (sChn <> "") Then
    Call ChnCopy(oGrp.Name & "/" & sChn, oGrp.Name & "/" & oChn.Name)
    Call ChnDel(oGrp.Name & "/" & sChn)
    End If
    Next
    Next
    'function for transforming the channel
    Function transformTimeChnToNum(oChannel)
    transformTimeChnToNum = ""
    If (oChannel.DataType <> DataTypeChnDate) Then
    Exit Function
    End If
    transformTimeChnToNum = oChannel.Name & "_num"
    Call ChnCalculate("Ch(""" & oChannel.ChannelGroup.Name & "/" & transformTimeChnToNum & """)=Val(Ch(""" & oChannel.ChannelGroup.Name & "/" & oChannel.Name & """))")
    End Function

  • GregorianCalendar datetime format convert to  sql server date time format

    please help me
    my GregorianCalendar date time format is like this. *08/01/29 02:25:59* . I try to insert my database(sql server 2000 )
    data type is datetime ,in my database table display like this *2029-08-01 02:25:59.000* .can you help me to insert correct date in my database table like ( . *08/01/29 02:25:59*)

    use [PreparedStatement |http://java.sun.com/javase/6/docs/api/java/sql/PreparedStatement.html] and setTimestamp:
    [http://java.sun.com/docs/books/tutorial/jdbc/basics/prepared.html]

  • Need to convert to vector format.

    I have a document with pictures.  I need to convert it to vector format before sending to printer.  Not sure how to do it.  Using CS5.  Is converting to outlines the same? 

    It must be difficult to convert from illustrator into a vector format since no one has a specific answer.
    Soshagayle7,
    There is no automagic "conversion" from a raster image to a vector graphic. The artwork represented by a raster image can be redrawn as vector artwork.
    You can re-draw the artwork using the vector drawing tools in Illustrator or any similar program. You can even import the raster image and use it as a guide while "tracing" it with vector paths.
    Or (and this is where the all-too-common misconception about "conversion" comes in)...
    You can use the autotrace feature which exists in Illustrator or any similar program to try to automate the process of "tracing" the raster image with vector paths.
    Either way, you end up with what would more accurately be called a "reinterpretation" of the subject, not a "conversion" of the raster image in the sense of "converting" one file format to another.
    And that's the key. All that most current autotrace features (including the one in Illustrator) do is detect color differences between pixels of a raster image based upon a user-specified sensitivity setting, and then try to draw vector paths which follow along those detected differences. It's very much a garbage-in-garbage-out process.
    And even when the "in" is not garbage, there is no real intelligence involved. The kind of autotrace algorithms in Illustrator and programs like it have no shape-recognition intelligence. For example, in the case of a human face, the autotrace feature doesn't know that the eyes' pupils are round; it just detects a region of similarly-colored pixels and tries to draw a path around them. Similarly, in the case of a geometric logo that obvously (to a human) is supposed to contain a perfect circle, the autotrace feature doesn't "see a circle"; it doesn't go and get the Ellipse tool and draw a circle that fits, as any human would do. Again, it just tries to follow around the regions of similarly-colored pixels.
    But that sounds okay, right? Well think about it. Imagine turning the sensitivity of such an algorithm way up to the max. What's going to be the most accurate autotracing of a raster image? The mathematically "most accurate" result would be a perfect vector square for each and every pixel in the image. And the "vector advantage" of that would be absolutely nill. The resolution-independence reason for preferring vector paths would be rendered moot. Such a graphic would be entirely vector, but to absolutely no advantage regarding scaleability. (Thus my comment about the line drawn with a 1-pixel raster image.)
    So the reason you haven't received an answer to the "how do I convert" question is because the same thing has been explained in this forum countless times, and to answer it correctly really requires a lengthy explanation (like this one) that tries to clear up the too-common misconception that autotracing is some kind of magic bullet for "converting" a raster image into a vector graphic in some kind of mathematically accurate way that then yields all the advantages of properly drawn vector graphics.
    Autotracing is useful to those who understand when it's appropriate and why. But without seeing or at least knowing more about the actual raster image you are dealing with, advising whether it's appropriate in your case is nothing but a guess. Generally speaking, if the image in question is not already of high enough resolution at the size at which it will be printed, then it's probably also not of high enough resolution for good auto-tracing results. And if it is of sufficient resolution for the size at which it will be printed, then there's probably no reason it needs to be vector.
    Bottom line: There's a good reason why vector graphics are preferred. But that means properly-drawn vector graphics. The best way to "convert" your raster image to a vector graphic is to re-draw it using the vector tools. The sometimes-acceptable but often sub-standard "cheat" for doing it is to import the graphic and apply the autotrace feature (called LiveTrace in Illustrator). It's use is explained in the online help.
    Autotracing--the "conversoin" that such questions are almost always talking about--is not a lossless translation, like converting quarts to gallons or binary to hexidecimal. Entropy always rules. Anytime something is automatically "reprocessed" something is lost, not gained. You see that in everything from repainting a room over and over without removing the old paint, to taking photographs of photographs of photographs. Degradation occurs. You swap one kind of ugliness for another. That's autotracing when used inappropriately.
    The drawing tools exist for a reason. If you really need vector paths, you should probably draw them.
    JET

  • During export from Discover to Excel, Time Format changes to Number Format

    Hi
    I have a seconds column which is of number datatype. But in my report, I am converting the number in *0HH:MI:SS* format. For example, I have *4952534 seconds*. So my report is showing *1375:42:14* which is a Time Format. It looks good when I view the data in Discoverer Viewer or Plus. But when I try to export the data to Excel, the time format gets converted to *4952534 seconds*, which is creating problems. So can you suggest on how can I preserve the formatting during export to excel from discoverer.
    Thanks
    Sachin

    Hi,
    Excel will not implement the 0HH:MI:SS data format, it just gets the field as a number. You will have to format the field into text using the calculation from my previous post.
    Rod West

  • Display value in hh:mm time format in SSRS Report

    Hi Everybody,
    I have an SSRS report where one of the column is sum of time values. When I do the summation, the values are coming in this format. In the last column the minute value is getting displayed more than 60. How can I format it to proper time format as hh:mm
    so that it displays as "08:15" . The expression which I am using is "  Sum(CDec(FormatNumber(Fields!Overtime_Hours.Value,2)),"Month"). Your help would be highly appreciated.
    January
    31/1/2014
    21/04/2014
    00:00
    07:75
    00:00
    07:75
    Thanks & Regards,
     RPC
    Regards RCP

    Hi RPC24,
    According to your description, you can calculate the correct value of time summation. Now you want to make the result into proper time format (hh:mm). Right?
    In this scenario, we can convert the time into string type, split the string based on delimiter ":" and convert each part into integer. Then do the calculation for each part and set the hour increase 1 every 60 minutes (we can adjust in expression).
    We have tested this case in our local environment. Here are screenshots for you reference:
    1. The report design looks like below:
    A: =Format(TimeValue(Fields!StartTime.Value.ToString),"hh:mm")
    B:=CStr(SUM(CInt(split(CStr(Format(TimeValue(Fields!StartTime.Value.ToString),"hh:mm")),":")(0)))+SUM(CInt(split(CStr(Format(TimeValue(Fields!StartTime.Value.ToString),"hh:mm")),":")(1)))\60)+":"+CStr(SUM(CInt(split(CStr(Format(TimeValue(Fields!StartTime.Value.ToString),"hh:mm")),":")(1)))
    Mod 60)
    Ps: In this sample, we used Time data type. You may need to do some modification in your expression based on the data type of the time data field.
    2. The result looks like below:
    Reference:
    Summing the Value of HH: MM: SS In SSRS
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Internal table data 1E2 automatically convert to scientific format

    Dear all,
    I have been searched for solution moths from the forums and tried all possible methods, but still no way to solve my above problem.  I found a way to solve it partially for us, but may be very helpful for others who meet similly case like mine, so I posted here.
    my problem is when I export my internal table data to Excel, the Cell data with 1E2 auto becomes 1.00E02, and 1E8 becomes 1.00E08, we need it to be 1E2 and 1E8 in excel.
    you can recreate my problem by
    1,  input 1E2 into your Microsoft Excel, then Enter, it will auto change into scientific format. which is we do not want.
    2, use any of your SAP system open any table as long as there is a Char (>3) field in that table. add some
    data entry in that field in the form "any amount (<15) of numeric 1 to 9"E"any one or two numeric 1 to 9". such as, 123E2, 1234E12 etc. then save this table's data to local file spread sheet, or use any FM to download it to a Excel file, when you open this
    file by Excel, the cell with above form will display as scientific. but
    if you put three or more numeric after the "E", such as 123E123 it will
    display correctly.
    what I have done:
    I searched in SCN for similar thread:
        Export to Excel 2007 - item number problem
        Exceding the limit of numbers in Excel at target side
        Excel download cell format problem
        Formating as Text in excel through SAP
        Converting of amount field into excel file through GUI DOWNLOAD
        Data downloaded to excel gets converted to exponential format.
        Problem with Excel download   and scientific number
        Re: Issue in displaying numbers in Excel?
        CSV Flat File Data Problem (Number converting to Scientific Notation)
    Tested accordingly, But none of these works in our case. because our
    ultimate receiver of email attachment will be external third party, we cannot ask
    them to change anything in their Excel.
    Search Microsoft help about Excel, http://support.microsoft.com/kb/214233,
    and it says this "Automatic Number Formatting" is a normal behaviour of excel.
    no way to turn it off, the "work-around" way that Microsoft provides is not suitable for our
    case.
    We test CL_iXML recently arrording to weblog http://wiki.sdn.sap.com/wiki/display/Snippets/FormattedExcelasEmailAttachment
    it successful controled the format. so this could be a solution for others whose internal table size is small. but our 2MB internal table bocome 6MB when converted to xml file attachment, which cannot be received by our end user's mail box. too big.
    So please advise your ideas.
    Many thanks in advance!
    Peter Ding
    Thank you very much for your time!

    Hi,
    You can achieve this by describing the spreadsheet in XML with the help of the DOM classes.
    The later releases of Excel can read and save spreadsheets as XML, providing your release supports this you can achieve it.
    Check out the following Wiki
    [Excel - XML|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/exporting%2bdata%2bto%2bexcel%2b-%2bxml%2bto%2bthe%2brescue]
    Regards,
    Darren

Maybe you are looking for