How to convert datetime in a JSF page or within the object entity of seconds since 1970

Please HELP I have a column of type bigdecimal seconds since 1970 representing datetime.

for example

DateTimeCol

1333382669.06

expected output for the datetime type is 2012-04-02 16:04:29

I build JSF form that display the column DateTimeCol. DateTimeCol type and Date format

YYYY-MM-DD hh: mm: but the output of the column DateTimeCol is 9616-11-09 03:09:06 and it won't.

I do not know how to convert (1333382669.06 seconds since 1970) in datetime (2012-04-02 16:04:29)

I'd appreciate your help.

Your problem is that the date data type coming milliseconds and not in seconds. You should be abel to do the math and use a

java.util.Date(your_sec*1000).tostring ();

Google for a timestamp converter (e.g. Epoch Converter - Unix Timestamp converter) and enter your number

Entry 1333382669.06 * 10 = 1333382669060 lets you get: (here I use only * 10 that you already have 1/100th of a second!)

Assuming that this timestamp is in milliseconds:

GMT: Sunday, March 24, 1974 06:24:26 GMT

Timo

Tags: Java

Similar Questions

  • External JSF pages to view the contents of the URL

    Hello

    Is it possible for a JSF page that uses the PanelPage component and the ADF controls to provide menus, etc to actually allow an HTML page (accessed via a URL to an external site/application) to be displayed somewhere in the JSF page?

    For example, clicking on a menu item to an external HTML page causes the page currently displayed in a frame or similar in the JSF page?

    I tried the FrameBorderLayout control and control Frame to try to integrate a picture to display such a page through the establishment of goals for a menu item, but that doesn't seem to work. At least not when in a PanelPage. It works within a basic JSP page.

    I would have thought that it would be possible for an application of JSF to incorporate content from other sites/servers HTML as if a part of the application. Even if it meant the definition of 'wrapper' of some pages effectively sort the link in the JSF application within its rules of navigation.

    Or am I missing something?

    Gene

    Hello

    You can use an iFrame wrapped in a f: tag verbatim. This will make

    Frank

  • How to debug an application incident that occurs only within the executable and not developing?

    LabVIEW 2011

    Looking for ideas on how to debug an application that crashes only from within the executable.

    Is there something useful that this error report can be used to, thanks in advance.

    ####
    #Date: Tuesday, August 23, 2011 15:10:18
    #OSName: Windows 7 Enterprise
    #OSVers: 6.1
    #OSBuild: 7600
    #AppName: LabDAQ
    #Version: 11.0 32-bit
    #AppKind: AppLib
    #AppModDate: 23/08/2011 18:59 GMT
    Base address of #LabVIEW: 0 x 30000000

    23/08/2011 3:10:48.331 PM
    Crash 0 x 0: Crash taken to DENY
    File Unknown (0): Crash: Crash captured by DENYING
    Minidump ID: a1c0be18-ad05-4b09-b914-afe4a3073daf
    ExceptionCode: 0xC0000005± N
    0x3072C874 - lvrt + 0
    0x3072CC28 - lvrt + 0
    0x7C37FDB4 - MSVCR71 + 0
    0x77330DF7 - ntdll + 0
    0x772F9ED5 - ntdll + 0
    0x00000000 - + 0

    I sprinkle a button Dialogs in any code that I can see to what extent the code gets before it crashes.

  • How to align items in a jsf page?

    Hi all

    In my case, I need to use the three user interface components like pushing the menu drop-down

    a textbox control and a button. When I slipped all the things on my jsf page

    I'm getting one. (I mean I'm getting button under the menu drop-down

    and refoulement under the text box)

    I want that all these components that are adjacent to each other. Came nicely with suggestions.

    Thank you
    Phani.

    These three components surround AF: panelGroupLayout and horizontal af:panelGroupLayout layout property value (in the common area of the property inspector, you can find layout property).

  • How to convert DateTime xml in xdp (Designer)?

    Hi, I want to convert DateTime format an XML in the designer, the value DateTime in xml format is NOT in common format YYYY-MM-DD (if it is in a common format, can I do this with pattern)

    I have a 'DateTime' field in Xdp can obtain Xml date and time:

    In XML < DateTime > DD-MM-YYYY < / DateTime > I want to convert in XDP in DateTime Field in 'April-DD-YYYY ".

    Can I do this?

    You can do this way...

    Bind the date field in your XML tag.

    Set the model display to the date field.

    Place the following code in the initialize event of the date field.

    The value JavaScript as a language.

    var dtStr = this.rawValue;
    var pos1 = dtStr.indexOf ("-");
    var pos2 = dtStr.indexOf ("-", pos1 + 1);
    var strMonth = dtStr.substring (0, pos1);
    strDay = dtStr.substring var (+ 1 pos1, pos2);
    var strYear = dtStr.substring (pos2 + 1);

    Assign the value to put in shape to the Date field.

    this.rawValue = strYear + '-' + strMonth + '-' + strDay.

    Thank you

    Srini

  • How to convert Datetime in number?

    chg_date_time

    40265.492


    SELECT c.chg_date_time, TO_DATE('01011900','DDMMYYYY') + CHG_DATE_TIME OF CHNGHIST C



    After that, run:
    2010-03-30 11:48:29


    In the above query, convert us number to datetime.



    Now, I want to convert Datetime in number.


    i.e., 03-30-2010 11:48:29 =? (40265.492)



    Thank you
    Nihar

    Simply activate your expression.

    not tested

    SELECT to_date('30/03/2010 11:48:29','dd/mm/yyyy HH24:mi:ss')-TO_DATE('01011900','DDMMYYYY') FROM dual;
    
  • How to disclose a tree inside a page fragment of the workflow on the opening

    Hello

    I use JDeveloper 11 g 11.1.2.1

    I have the taskflow with the inside page fragment. This page fragment inside a tree there.
    I need to disclose this tree on the opening page.
    I know how to disclose the tree, but what place I could call the method for disclosing this tree?
    It is possible to use BeforePhase of f: view of the jsf page, but I use page fragments.

    Anatolii

    Hello

    You can use EL pointing to a bean managed to control the State to disclose the tree. The managed bean should be available during the initialization of the workflow (there is a property initializer is called before the first view renders). You can then use the initializer to set the desired tree open State

    Frank

  • Automatically, click a CommandButton in the JSF page after loaded the page

    I need to automatically, click the command button 'refreshPage' after loading of the JSF page below: (after trying the code in blue comment I'm unhappy. Please help!)

    <? XML version = "1.0" encoding = "UTF - 8"? >
    "< jsp:root xmlns:jsp ="http://java.sun.com/JSP/Page"version ="2.1"
    "xmlns:f ="http://java.sun.com/jsf/core"
    "xmlns:h ="http://java.sun.com/jsf/html"
    "xmlns:AF ="http://xmlns.oracle.com/adf/faces/rich"
    "xmlns:PE ="http://xmlns.oracle.com/adf/pageeditor"
    Cust ="http://xmlns.oracle.com/adf/faces/customizable" >. "

    < f: loadBundle basename = "oracle.webcenter.portalframework.sitestructure.resource.PortalAppPageResource"
    var = "portalResource" / >
    < jsp:directive.page contentType = text/html"; Charset = UTF - 8 "/ >

    < f: view >

    < af:document id = "d1" title = "#{portalResource ['home_title']}" >

    <!-< af:clientListener method = "callRefreshButton" type = "load" / >
    < af:resource type = "javascript" >
    function callRefreshButton()
    {
    var button = AdfPage.PAGE.findComponentByAbsoluteId ("refreshPage");
    ActionEvent.queue (button, true);
    }
    < / af:resource >->

    < af:messages id = "m1" / >
    < af:form id = "f1" >

    < af:pageTemplate value = "#{bindings.pageTemplateBinding.templateModel}" id = "pt1" "
    viewId="/oracle/webcenter/portalapp/pagetemplates/pageTemplate_swooshy.jspx" >
    < name f: attribute = "showNavigation" value = "#{true}" / >
    < f: facet 'content' = name >
    < af:group id = "g1" >
    < af:inputText label = "Label 1" id = "it1" / >
    < / af:group >
    < / f: facet >
    < / af:pageTemplate >

    <!-< af:commandLink id = "refreshPage" text = "refreshPage.
    action = "#{WangBean.reloadPage} '"
    rendered = 'true '.
    inlineStyle = "do-size: small;" color: white; »
    partialSubmit = "true" clientComponent = "true" >
    < / af:commandLink >->

    < af:inputText value = "#{bindings." Sdan8.inputValue}.
    columns = "#{bindings." Sdan8.hints.DisplayWidth}.
    maximumLength = "#{bindings." Sdan8.hints.precision}.
    shortDesc = "#{bindings." Sdan8.hints.ToolTip}"id ="it2.
    Visible = "false".
    inlineStyle = "do-size: medium;" make-weight: bold; ">
    < f: validator binding = "#{bindings." Sdan8.validator} "/ >"
    < af:convertNumber groupingUsed = "false".
    model = ' #{bindings. " Sdan8.format} "/ >"
    < / af:inputText >

    < / af:form >

    < / af:document >
    < / f: view >
    < / jsp:root >

    Timo,

    I got it works!

    What happened is that I didn't notice that the system generated a method of PollEvent by default for me inside my WangBean after I created the af:poll component:

    {} public void reloadPage (PollEvent pollEvent)

    Add your code here

    }

    Once I pasted my code in the vote started working as expected and the inventory button. Component AF:poll solve my problem.

    Thank you very much and I have learned 2 new staffs ADF on your part, am really appreciated.

    Kind regards

    Yi

  • How to convert a file name in a caption to the PS

    Can someone tell me if I can convert a file name in a caption to the PS?

    Who needs script, see please

    Add the file name as a cachet of image | Adobe community

    or do a Forum search on to the

    Photoshop scripts

  • Page number: make the objects to stay

    Hello, I am working on a dress up game and I have a problem with it. There are so many articles of clothing (which are video clips with drag and drop code base) that I had to create different pages for them. I have buttons (labeled as "dresses", "pants", etc.) that appear when you click on make this group of items. So very well. It's just that when an item is dragged over to the doll and set up, I want to stay here. But as soon as you click on another page, the point disappears. Is it possible to do items remain on the doll, even if they are part of a page?

    Here is an example of a game that does what I want: see how you can drag a dress on the doll, go to 'underwear' and the dress is still there? That. xD


    http://savivi.deviantart.com/art/soulless-Victorian-dress-up-137124180

    If you are using AS3 you reparenting the object using something in the sense of... dollMC.addChild (droppedObject). If you need to manage the positioning by.  If the doll had the same saving compared to the scene as the pages location, then you wouldn't need to adjust when occurs the addChild.

  • How drag and drop a picture into a shape of the object?

    On my old Lion system that I used to be able to drag a picture from iphoto in the shape of the object open in Pages.  I can't be able to do more.  The system changed?  I tried to use Inspector (under help), but it won't let me access the file of the photo on the right.

    You can drag and drop a picture in a form in v4.3 Pages ' 09, but this can be done in any version of v5 Pages. Quite different applications, as well as more recent Pages has lost about 100 features that were in its antecedent.

    Check if you have Pages ' 09 v4.3 in your Applications: iWork ' 09 file. If so, use it.

    Pages v5 requires that you select a shape, and then on the Image tab in the right panel, you choose Image, scale to fill fill, and then select your image for the background. You cannot select this image from the inside, but you can add text to the form that will appear on your image.

  • Pages cannot lock the object!

    I've been using pages for a while and for some reason, recently, I can't lock or group objects. It is a reference image. The lock is disabled for some reason any.

    This looks like an operation to exclude it. Select the remains and in the Layout tab, choose Object Placement under stay on the Page. Now, the lock button become available and actually locks the object.

    Pages on OS X 10.11.4 v5.6.1.

  • How to convert a file FrameMaker containing pages Portrait and landscape in PDF?

    I recently converted to 9 FrameMaker and Acrobat 9. In the FrameMaker manual created by me, most of the pages have portrait orientation, but some have landscape orientation. However, when I convert the manual as a PDF using Acrobat Distiller, pages in landscape becomes Portrait. It wasn't a problem when I converted the PDF manual in earlier versions of Acrobat Distiller, he showed up after I installed Acrobat 9. In other words, the FrameMaker file has worked before. I also tried this on three different computers to make sure that the computer is not the problem. Does anyone have ideas that I could try to do this job?

    Jorunn, never solved this problem? If this isn't the case, I have a solution for you.

    In FrameMaker, select the book you want to create a PDF file, click file > print and select Adobe PDF as the printer.

    Click Properties and make sure you have the selections you want.

    Back on the Print Setup dialog box, leave the paper and Orientation as a letter and Portrait respectively.

    The print dialogue box book, select print to file and navigate to the correct location. Be sure to save as a PostScript (name.ps) file and the safe field book both, you want only selected file.

    Once again on the print dialogue box book, click on the checkbox to generate data Adobe and click Configuration of PDF. On the PDF configuration for the selected files dialog box, PDF job options, select print quality or make the choice for your situation for settings, Favorites, Tags, and links.

    With Adobe Distiller open, file > open and find the .ps file you previously reported. Also check that your default settings for the PDF file are correct. When the Distiller is finished, you can double-click the PDF to open it and check your landscape and portrait pages display correctly.

  • ADF: How to convert column ADF output text to link to the item in the table?

    Hello world

    I use Jdev 11 G.

    I dragged VO as adf read only the table that is to have 10 columns.
    now my requirement is to convert the first column "empid" to link the item.
    How can I convert this column as a link?

    and one more thing by clicking on this link, we should sail to OAF page from empid as parameter.
    How can I achieve this?

    Any answer will be really useful.

    Thank you.

    In my opinion, using af: goLink is the right option when you call a page of the outsider.
    you do not download workspace sample & test it provided link?
    You can select yr af:commandLink in the Structure window & do a right click to select "create a binding of the action method.
    In the open dialog box you can choose the "connection method" & then name the bean with the same method name generated by the IDE.

  • How to convert raw data from files (not CameraRaw) of the lot?

    Hello

    I have a number of files that are images of raw data, which means that each has a header of a certain length, containing some info readable on the dimensions height/width, the bit depth and then only the data on the color of each pixel.

    CameraRaw does not open them directly, but they are rather loaded in Photoshop with a dedicated loading menu options.

    I can open one by one after extension *.raw which apply to them and typing height, width, depth and size header in loading options menu that opens, but I would like to know how to batch convert them rather than having to do this process for each of them.

    Of unfortunately Photoshop batch processing does not seem to be able to their treatment on its own, I guess that's maybe because they do not have the usual software-readable RAW headers found in several treaties formats.

    Thank you

    Alfred

    You may be able to write a Photoshop script to do this.  Script can access your files from file systems.  For example, a Script could rename a file to Name.RAW.  Then open Name.RAW in Photoshop with the logon options.    However, I do not know for sure there and options open to the adobe open raw file object.  You need to do this, read the script.

Maybe you are looking for

  • Play memories crashes

    browser stops when I open memories play in windows 8.1. I reinstalled several times and continues to crash.

  • New laptop - you see is not the local copy of the library

    I've always had my library (500 GB) on a USB external drive. This has never caused a problem for several years. I recently got a new laptop (Lenovo X 250 Windows 7) and I'm working through the implementation. I downloaded the latest version of iTunes

  • PXI-4060

    A map of the PXI-4065 DMM is a PXI-4060-compatible?

  • How to extract individual values of TCP packet?

    Hi all! IM facing a situation where I have to extract individual values to insert into a sql database. IM sucessfully receiving the package and I need to insert values lie between {xxxxxxxxxxxxxxxx}, each value name (column name) is bounded between "

  • How to trigger the value change in the structure of the event

    HII everyone, like the title, how should I trigger the value change event to display a message... Here is my connection... I want to trigger structure of the event to bring up the subvi, when the flame and the led are TRUE State... I have using the n