How to convert to format Date in milliseconds

Hi all

I am getting the output of a variable in milliseconds format, how can I convert it in date format

For ex: I get variable input like 1366664691000 and I need to convert it to April 22, 2013 23:04:51 CEST (or SOA form). is there any function for this in XSL or XPath?

Thank you

Hello

My XSLT works now after making a few changes

and included namespace xmlns:fn = "http://www.w3.org/2005/xpath-functions.

Now, I'm successfully number of days. My use case is to delete the files of the bases on the number of days. (i.e. changed the time - current date).

Once again thank you @ vladidos

Tags: Fusion Middleware

Similar Questions

  • How to convert String to Date

    hell there everyone,

    I have a question which is:

    How to convert a string that we get by reading an XML in the instance of date value type?

    So there is a XML that modifiedDate as an attribute on a node of the XML and how I put this value in an instance variable date?

    the timeformat in the XML file is: mm/dd/yyyy hh: mm: = > 31/12/2010 23:57:46

    I chose this time format because I want to use the method . parse() which always causes an error, but that's another topic...,.

    hope I was clear on the issue,

    Thanks in advance for the help.

    First of all, you should watch the Date object constructor to find out how to specify different parameters.

    public void Date (yearOrTimevalue:Object, month:number, date:number = 1, hour:number = 0, minute:number = 0, second:number = 0, millisecond:number = 0)

    Then you need to determne how to break the string by using the String.Split method.  The first split() should be the space between the date and time, the second for the slashes in the date and the third for the colon in time.

    Then you come to take each of these paintings of substrings and feed them in the constructor as the Number() values.

    If you remain unsure how to do this, look at the different terms that I have identified in the help documents and you will find them all explained with examples.

  • How to convert a hex date?

    I notice with the release of SharePoint Foundation 2010 metadata using cfsharepoint dates/times are converted in the following format: 0x01cf2d81. 0x71c80a00

    How to convert it to a regular date using ColdFusion?  I found a few references to this question here http://sharepoint.stackexchange.com/questions/66602/dates-and-times-in-properties-vs-field s/91069 #91069 which shows a solution like this:

    //fieldValue looks like "0x01cf2f8e|0x6e559e00"
    string fieldValue = listItem.Properties[dateFieldName]
    string hexValue = fieldValue.Replace("|", "").Replace("0x", "");
    long ticks = long.Parse(hexvalue, NumberStyles.HexNumber);
    
    DateTime date1 = DateTime.FromBinary(ticks).AddYears(1600);
    

    But I have no idea how to do that in ColdFusion.  Apparently, the hexadecimal value represents the number of ticks since January 1, 1600.  Crazy, I know.

    Any ideas?  Thank you.

    Thanks for your help in this, Alexander.  I have worked on this for a day and discovered some useful information and finally found an easier way to do this.

    Below, you will see that the number of ticks can actually be retrieved using the method of parseLong() of Java.  I don't know what is happening with inputBaseN or why it does not work for this scenario, but we cannot forget that for now.  Also, I discovered Windows time system does not start at 1600, he begins to 1601.  The guy in the article I linked to really wrong, so apologies for any confusion on that!  Finally, I convert the date in local time.

    Here's the complete code to convert the hexagonal date of SharePoint at regular date using ColdFusion.  Hope this helps someone in a similar situation.

      
      
      
      
      
      
      
      
      
    

    By the way, here's a cool article about a guy who goes to something similar: http://ruthsarian.wordpress.com/category/programming/coldfusion/

  • How to convert varchar to date datatype all insert or update in the table

    Hai All

    I need to convert to varchar type to date.

    I have two Tables T1, T2

    Structure of T1

    Code varchar

    Time varchar

    Date varchar

    Structure of T2

    Var EmpName

    Empcode var

    Date of the respondent

    Outtime date

    Intrinsically date

    Date of Introut

    Att_date

    Now I need to spend the time form T1 to T2 respondent, outtime, intrinsically, introut under certain conditions

    So now I need to convert Varchar to Date so that the insert or update

    I tried something

    Insert into T1 (code, respondent, att_date) values

    (To_date(Date|| dele de code temps, «hh24mi de mon-dd-yyyy»), att_date);

    OR update while

    Setting a day set Outtime T2 = To_date(Date||) Time, 'hh24mi mon-dd-yyyy') where...


    I got an error Ora-01861


    Concerning

    Srikkanth.M

    You did not show an example of your date or time values, control may be necessary to add a space between them, like

    To_date(Date || ' ' || time,'dd-mon-yyyy hh24mi')
    
  • How to convert a xs: date for XS: DateTime

    In my application, there are the following 2 cases, I need to manage:

    1. I have a "XS: date" and I need to convert it in "XS: DateTime".
    2. I have a "XS: date" and a "XS: Time" and I need to combine in ' XS: DateTime.

    Following the answer to this question on Stackoverflow, I tried both " xs:dateTime($date) "and" fn:dateTime($date, $time) " but none of them worked.

    When I used " xs:dateTime($date) " to manage the 1st case, I got the following exception during the OSB has reached the stage of conversion for the date:

    OSB Replace action failed updating variable "body": Error parsing XML: {err}XP0021: "2014-12-09": can not cast to {http://www.w3.org/2001/XMLSchema}dateTime: error: date: Invalid date value: wrong type: 2014-12-09

    When I used " fn:dateTime($date, $time) ", the transformation is not yet accepted by the IDE. " It displays the following error:

    line 113, column 42: "{http://www.w3.org/2004/07/xpath-functions}dateTime" unknown function (or number of arguments (2) is wrong

    For now, as a solution, I use 'concat' to combine the date and time fields in the 2nd case and add 'T00:00:00' to handle case 1, but I think that this is not a good approach.

    I would be very grateful if you could show me how I can correctly convert date in dateTime format fields.

    For the moment, I use OSB 11 g with the last v11.1.1.7.4 grouped patch applied.

    Found in the documentation that, in fact, only the working paper 2004-07 is implemented in this version:

    https://docs.Oracle.com/CD/E28280_01/admin.1111/e15867/XQuery.htm#OSBAG444

    According to the specifications, the casting of XS: date for XS: DateTime should work:

    XQuery 1.0 and XPath 2.0 functions and operators

    But as I mentioned previously, it is perhaps that you do not pass the correct data type.

    If the data are not based on a schema, then sch:jdOriginalPromisedDeliveryDate will be considered from type xdt: untypedAtomic and cannot be cast in all except XS: String.

    Is - it works better:

    {xs: date ($jdOriginalPromisedDeliveryDate) cast as xs: DateTime}

    ?

  • How to convert number in date and time in labview

    Hi all

    I have a hexadecimal string and converted into a number. Now this number to display in the format of timestamp. Uses the format of the time Unix.

    By using this link, I can convert this number to timestamp.  http://www.UnixTimeStamp.com/index.php

    But how it should be done in LabVIEW? I know it may be simple, but please help.

    I enclose my VI for referance.

    Thank you

    Manisha

    Hi Man_Can,

    You can add the origin of UNIX timestamp to your number:

  • ISE: Import Mac: how to convert Mac format string to hexadecimal

    Hello

    I have to import thousands of mac address for Ip-Phones.
    I scanned these ip-phone-mac in the boxes.

    Now all my mac are parsed as a string 'aabbccddeeff '.

    Unafortunaltely, being imported from ISE, they must be in the following format
    ' aabbccddeeff:

    Othewize the ISE send an error like:
    "Invalid MAC address. Please enter MAC address as nn:nn:nn:nn:nn:nn.

    I'm not an expert in C +, so I wonder if there is a program for that.
    Kind regards.

    Michel Misonne

    Microsoft Excel can manipulate strings of text for you

    Sent by Cisco Support technique iPad App

  • Have Lightroom 5.7 How to convert raw format to JPEG after developing?

    How can I change the RAW to JPEG images after I develop them in the bright room, 5?

    Lightroom is a non-destructive editor and never touch the original.

    To get your work out of LR you export. Select the files you want to export in the library and click Export.

    Export of creates a new file, which will include any changes you have made.

  • convert the varchar2 data type to the data number type

    How to convert the varchar2 data type to the data type number.


    It looks like my data

    create table one)
    col1 varchar2 (50)
    col2 varchar2 (500);

    Insert in a (col1, col2) values ('1234 ', ' 2345');

    Select Column1 of number (19)) cast (to_number (col1);

    IAM getting error invalid number


    I need to create a table with the same columns with data like number types (19)

    can someone help me

    Thank you

    You have changed your original post, so now I see that you get the invalid number.

    This is why you should always avoid the varchar columns to store numbers or dates...

    Since your table source contains a nonnumeric value, you can write a pl/sql to convert data and see what records are false:

    SQL> insert into a (col1,col2) values ('xxxx','2345');
    
    1 row created.
    
    SQL> select * from a;
    
    COL1     COL2
    -------- --------
    1234     2345
    xxxx     2345
    
    2 rows selected.
    
    SQL> create table b (col1 number(19), col2 number(19));
    
    Table created.
    
    SQL> set serverout on
    
    SQL> declare
      2  cursor c is
      3  select * from a;
      4  begin
      5    for r in c loop
      6     begin
      7       insert into b values (to_number(r.col1), to_number(r.col2));
      8     exception
      9       when invalid_number then
     10        dbms_output.put_line('Row rejected: col1='||r.col1||' col2='||r.col2);
     11     end;
     12    end loop;
     13  end;
     14  /
    Row rejected: col1=xxxx col2=2345
    
    PL/SQL procedure successfully completed.
    
    SQL> select * from b;
    
          COL1       COL2
    ---------- ----------
          1234       2345
    
    1 row selected.
    

    Max

    Published by: Massimo Ruocchio, June 14, 2011 20:00
    Added the first query in the example

  • How to convert the date in milliseconds?

    Hi all

    Can I know how to convert the date in milliseconds?

    My current datetime like this Formate

    QDateTime::currentDateTime (m:System.NET.SocketAddress.ToString ("MMMM dd, yyyy HH"))

    Seconds since January 1, 1970

    http://Qt-project.org/doc/Qt-4.8/QDateTime.html#toTime_t

    Sinds milliseconds January 1, 1970

    http://Qt-project.org/doc/Qt-4.8/QDateTime.html#toMSecsSinceEpoch

  • How to convert number in the Date format

    Hi Experts,

    I have a date column says. date key order number (ex: 20110202). How to convert this number in format DD/MM/YYYY.

    Thanks in advance
    V

    Vincent Krishna wrote:
    Hi Experts,

    I have a date column says. date key order number (ex: 20110202). How to convert this number in format DD/MM/YYYY.

    Thanks in advance
    V

    SQL> select to_char(to_date('20110202','YYYYMMDD'),'DD/MM/YYYY') from dual;
    
    TO_CHAR(TO
    ----------
    02/02/2011
    
  • Convert the date in milliseconds

    Hello

    I am trying to write a function to create an event on the calendar

    the function takes at the beginning of the year, month, day and time. Also the end time

    EventList eventList = (EventList) PIM.getInstance () .openPIMList (PIM. EVENT_LIST, PIM. WRITE_ONLY);
    Event e = eventList.createEvent ();
    e.addString (Event.SUMMARY, PIMItem.ATTR_NONE, "The Gym");
    e.addString (Event.LOCATION, PIMItem.ATTR_NONE, "Gym");

    dates back to January 1, 1970
    e.addDate (Event.START, PIMItem.ATTR_NONE, startDate);
    e.addDate (Event.END, PIMItem.ATTR_NONE, endDate);

    I'm stuck trying to figure out how to convert, say, an entry 2013 (year), 3 (months), 7 (day) in millisecond so that I can

    Put it in the field hiring date

    Thank you

    2 options:

    (1) use a Calednar object, use the methods of 'set' associated with it to set the year, month, day, etc. (not to mention the January is month 0) and then get the Date in that and then the time from the Date.

    (2) format your date so that it is acceptable to HttpDateParser and the race that against your date string.

  • Convert number to date format

    HI team,

    I have a problem, how we can convert number in date format?
    This is the result of the query.

    SQL > col START_TIME for 999999999999999999999999
    SQL > select start_time in qrtz_triggers;

    START_TIME
    -------------------------
    1364243906000
    1364589406000

    So, I have to change the date format niumber rto.

    My date format as for example: "" Mar 25,2013 20:36:45 ""


    Please suggest me...
    Thank you
    Chavigny

    Published by: 939938 on March 14, 2013 06:39

    This is the number of milliseconds since January 1, 1970.

    SQL> SELECT to_char(to_date('01/01/1970','mm/dd/yyyy')+1364243906000/24/60/60/1000
      2  ,'Mon dd, yyyy hh:mi:ss PM') FROM dual;
    
    TO_CHAR(TO_DATE('01/01/1970','
    ------------------------------
    Mar 25, 2013 08:38:26 PM
    

    So in your query instead of start_time use
    TO_CHAR (to_date (' 01/01/1970 ',' mm/DD/yyyy') + start_time/24/60/60/1000,' Mon DD, YYYY HH: mi: ss PM "")

    Published by: kendenny on March 14, 2013 08:31
    Had used mm instead of e for the minutes.

  • How to move from a date format in the report for custom funtions

    Hi all

    I have a funtion customized with 2parameters with dates and it returns a number. I used this function in sql query and return data in the sqldeveloper tool, when I use the same query in report rdf, that it is not all the data is. Please suggest me how it works.

    Thank you

    Ravi

    You must convert the standard date FND that is in canonical format to a regular date using FND_DATE format. CANONICAL_TO_DATE, this conversion must arrive on the date which is accepted as the value of parameter in your SQL report or where ever it is used in the report. I often use in my PL/SQL base concurrent programs and I think that's true in RDF as well.

    Best regards

    Arif.

  • SYSDATE - how to convert a certain format

    Hello

    I am trying to use sysdate as default setting in one of my reports and receive an error message (ORA-01843: not one month valid)...

    My sysdate is coming in the following (DD-MMM-YY) format and gives an error message... but when I tried the date manually in the following (JJ/MM/AAAA) this format worked...

    can I know how to convert the following format DD/MM/YYYY to sysdate

    Thanks in advance

    Maybe he means LUN-JJ-AA? And Yes, using 2 years of numbers is an accident waiting to happen...

    Thank you

    Tony Miller
    Webster, TX

    Follow your passion; the rest will take care of itself.

    JMS

    If you answer this question, please mark the thread as closed and give points where won...

Maybe you are looking for

  • M30 SP: Response of the slow keys

    Hello! I am facing a pretty annoying problem with my laptop Toshiba Satellite Pro M30. Sometimes, when I type, delays occur before appear it of characters on the screen. It's found everywhere: e-mail client instant msn, internet address exploring bar

  • Can I quote the 'switch' inside my router?

    I hope there is a way to name the 'switch' in my router so that it shows up as anything other than "unknown" in my network card in Windows. Is this possible? Or maybe just a way to make it appear differently in Windows 7, as to change the icon to som

  • Measurement of the envelope of the AC

    Hi guys,. I have a cDAQ-9188 with a NI9205 analog input module. I am able 3 AC 10 kHz differential signals and two of them are amplitude modulated at a low frequency of I was thinking about sampling to ~ 25 kHz and and calculate RMS values each 500 s

  • easy excel stand alone text error

    Hi all Receive error-2146827284 to easy excel text in stand-alone application.  This application works very well in the development environment very well, but not in the executable file.  I have included the library and class in my build.  One differ

  • Try to update security update for Windows Vista KB2286198, get error code 80070017?

    Impossible to update a security update