Millisecond date to another date format

I have a date/time value in milliseconds. I want to convert it into a regular date/time format like mm/dd/yyyy hh:mm:ss:ms. I have reviewed the J2SE 5 documentation and googled this subject to death. I found nothing that helps. Can anyone help me solve this problem? Thanks.

see
java.util.Date - it's constructor that takes a long
java.text.SimpleDateFormat

Similar Messages

  • To compare date with another date in string in siebel bip report

    Hi,
    In my rtf I am comparing a Date1 with a date in string i.e. '10-NOV-14'. If Date1 is less than '10-NOV-14' I am dispalying a certain text and if not another text.
    This condition is working fine if Date1 have 2014 values but if  Date1 cointains 2015 date than the mentioned condition is falling.
    Kindly suggest any solutions.
    Regards,
    Siddhika

    This example may help:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    version="1.0">
    <xsl:param name="currentDate"/>
        <xsl:variable name="firstDate" select="concat(substring($currentDate, 1,4),substring($currentDate, 6,2),substring($currentDate, 9,2))"/>
        <xsl:template match="/">
            <xsl:apply-templates select="//item"/>
        </xsl:template>
        <xsl:template match="item">
            <xsl:variable name="secondDate" select="concat(substring(submissionDeadline, 1,4),substring(submissionDeadline, 6,2),substring(submissionDeadline, 9,2))"/>
            <xsl:choose>
            <xsl:when test="$firstDate &gt; $secondDate">
                <xsl:call-template name="late"/>
                </xsl:when>
                <xsl:when test="$firstDate &lt; $secondDate">
                    <xsl:call-template name="ontime"/>
                </xsl:when>
                <xsl:when test="$firstDate = $secondDate">
                    <xsl:call-template name="same"/>
                </xsl:when>
                <xsl:otherwise>Monkeys<br /></xsl:otherwise>
            </xsl:choose>
        </xsl:template>
        <xsl:template name="ontime">
            This is on time
        </xsl:template>
        <xsl:template name="late">
            This is late
        </xsl:template>
        <xsl:template name="same">
            This is on time
        </xsl:template>
    </xsl:stylesheet>

  • Comparing a MaxDate with another Date field

    Hi there,
    I am trying to create a report that has  components on it, ReportDate, MaxReportDate, and JobID. I want to compare a max date with another date in my Web Intelligence report. For example, I have a field called Report Date. I have applied the Max() function to find the most recent date in the list of Report Dates. Therefore, I used this:
    Max([ReportDate]) --> MaxReportDate
    Then I want to compare the original Report Date field with the MaxReportDate and return the JobID if the ReportDate = MaxReportDate. Therefore, I used this for the JobID2 formula:
    = [JobID] where (ReportDate = MaxReportDate)
    This is not working. Am I doing somehting wrong? By the way, I am using SAP Business Objects BI Platform 4.0 Client Tools (version 14.0.2.364).
    Please help! Thanks!
    -Janice

    I did create a variable called MaxReportDate with the formula Max(ReportDate). When I test this variable, it works perfectly fine. However, when I use it to compare against ReportDate, there's where it gets tricky. 
    So it looks like the If ReportDate=MaxReportDate then JobID works. However, if I try to replace JobID with any other Measure variable, it does not return accurately. For example, say I have the following data:
    ReportDate Price
    11/30/2011  10
    13/30/2011  15
    I put it the following formula to get the price for the max report date:
    If [Report Date] = [MaxReportDate] then [Price]
    It should give me 15. Instead, it sums the numbers and I get 25.  Why is that?

  • Automate 'transfer of basic dates to forecast dates'

    Hi Experts
    I wish to have automatic transfer of Basic dates to FRC at the time of changing the status of Project definition to REL.
    So that, after release i will prohibit the transfer of basic to FRC. This is required to retain original scheduled dates in FRC.
    So, is there any userexit to build code for trigger transaction 'transfer basic to FRC' at the time of status change of PD?
    Or you may suggest any new idea in this regards
    Thanks and warm regards
    ramSiva

    Hi,
    I am not sure if there is  a standard way to do this, if anyone knows it please share your knowledge,
    There are several ways to obtain this , but all of them envolve development :
    - You can use this BADI ( if you are at least in 4.6 C) --> WORKBREAKDOWN_UPDATE ( method AT_SAVE)
    - You can create an event for object BUS2001 when it is released and the you have to program to copy from one date to another date
    - If possible you can use standard substitution (OPSN transaction) but you have to develop your requirement.
    I am not sure it is very clear...
    sara

  • Restored our SSRS 2008 R2 from one server to another; Dates are in UK format and not US

    We have restored our SSRS 2008 R2 from one server to another. The original server was in US locale/culture. The new server was in UK locale/culture, when the restore happened. However it should have been in US locale/culture. We have made this change and
    new reports work OK.
    However existing reports (i.e. saved by a user) are still trying to use the US dates in a UK format and as a result throwing a date cant be below 1753 error.
    Has anyone seen this issue before or have any idea what we need to do to fix it?
    Thanks
    Kimberlad

     Hi Kimberlad
    Have you checked any changes in the Collation? 
    Please verify Reporting Server Databases and Server Collation is there any mismatch with your Source Server.
    and also please post complete Error message..
    Nag Pal MCTS/MCITP (SQL Server 2005/2008) :: Please Mark Answer/vote if it is helpful ::

  • Another date formating issue

    I want the date to appear in Mmm-dd format - but I keep
    getting the full ODBC date format
    my query:
    <cfquery name="monthlyChart" datasource="2onboard">
    SELECT distance, time, walkDate
    FROM bockWalk
    WHERE month(walkDate)=#month(Now())# AND
    year(walkDate)=#year(Now())#
    </cfquery>
    my cfchart:
    <cfchart format="swf"
    style="/xml/dailyDistanceGraphs.xml"
    chartheight="175"
    chartwidth="575"
    showlegend="no"
    showborder="yes"
    show3d="no"
    foregroundcolor="000000"
    scalefrom="0"
    yaxistitle="Mileage">
    <cfchartseries type="bar"
    query="monthlyChart"
    valuecolumn="distance"
    itemcolumn="walkDate"
    seriescolor="ff0000">
    </cfchartseries>
    </cfchart>
    I've even tried formating it with an XML file
    Part of XML file
    <xAxis>
    <labelStyle isMultiline="false" orientation="vertical"
    />
    <labelFormat style="ShortDate" pattern="Mmm-dd" />
    </xAxis>

    quote:
    Originally posted by:
    jkgiven
    MikerRoo...
    Your solution stacks all my entries into one column instead
    of one for each date, why/how fix?
    Why didn't the <labelFormat style="ShortDate:
    pattern="MMM-dd" /> line in my xml work?
    Can you explain, or point me to a source, of how your lines
    work? - I really need to learn XML but it just doesn't seem to
    quite make sense to me.
    Your entries are all in one column because either:
    (1) You did not set the parseFormat pattern to match what was
    being returned by the database
    or
    (2) The chart granularity is set for monthly data and the
    data does not span enough time. Change the dateTimeStyle to:
    <dateTimeStyle majorUnit="Day" minorUnit="Day"/>
    <labelFormat style="ShortDate" pattern="Mmm-dd" /> did
    not work because (1) you needed to switch the axis mode to datetime
    and (2) the chart engine is very stupid and needs to be told
    exactly how to parse the values returned in the query. That is the
    purpose of the <parseFormat> tag.
    Finally, you do not need to learn XML per se.
    The XML styles are covered, a little, in the docs starting at
    <cfchart>
    There is a handy tool, webcharts designer, that you can use
    to generate xml styles at:
    c:\CFusionMX7\charting\webcharts.bat
    The Webcharts user guide covers the available styles in more
    detail. You can download that here:
    http://www.webcharts3d.com/website/WebCharts50/download/index.jsp

  • Best way To get data from another application using NDDE lbrary

    My vb.net application gets data from another application using NDDE Library. I got stocks prices (open,high,low,close,volume,change......(about 15 records for each stock)) (about 200 stocks) . I don't know if there is a problem in my code.
    This is my code:
    l : is the list of stocks.
    This Sub connects to server and requests the data :
    Public Shared Sub GetQuotes()
    Try
    client1 = New DdeClient(server, topic)
    client1.Connect()
    For i As Integer = 0 To l.Count - 1
    client1.StartAdvise("QO." & l(i).t & ".TAD$last", 1, True, 60000)
    client1.StartAdvise("QO." & l(i).t & ".TAD$open", 1, True, 60000)
    client1.StartAdvise("QO." & l(i).t & ".TAD$high", 1, True, 60000)
    client1.StartAdvise("QO." & l(i).t & ".TAD$low", 1, True, 60000)
    client1.StartAdvise("QO." & l(i).t & ".TAD$pclose", 1, True, 60000)
    client1.StartAdvise("QO." & l(i).t & ".TAD$volume", 1, True, 60000)
    client1.StartAdvise("QO." & l(i).t & ".TAD$date", 1, True, 60000)
    client1.StartAdvise("QO." & l(i).t & ".TAD$time", 1, True, 60000)
    Next
    Catch ex As Exception
    MsgBox(ex.Message)
    End Try
    End Sub
    and then I get the data from Client_advise sub (called each time a value changed )and fill the list. What I know is that client advise gets only one record for single stock each time is called..
    Example: for stock AAPL. 1st time enters client_Advise I get open price for AAPL, 2nd time I get high price for AAPL,3rd time I get low price..... and I update the value in the List (l)
    This the client_Advise Sub:
    Private Shared Sub client1_Advise(ByVal sender As Object, ByVal e As NDde.Client.DdeAdviseEventArgs) Handles client1.Advise
    For q As Integer = 0 To l.Count - 1
    If l(q).t = w(1) Then
    Dim item() As String = e.Item.Split("$")
    If l(q).Open = "#" Then
    l(q).Open = "0"
    End If
    If l(q).hi = "#" Then
    l(q).hi = "0"
    End If
    If l(q).lo = "#" Then
    l(q).lo = "0"
    End If
    If l(q).Close = "" Or l(q).Close = "#" Then
    l(q).Close = "0"
    End If
    If l(q).pclose = "#" Then
    l(q).pclose = "0"
    End If
    If item(1) = "open" Then
    l(q).Open = Format(Val(e.Text), "0.00")
    ElseIf item(1) = "last" Then
    l(q).Close = Format(Val(e.Text), "0.00")
    ElseIf item(1) = "high" Then
    l(q).hi = Format(Val(e.Text), "0.00")
    ElseIf item(1) = "volume" Then
    l(q).Volume = Val(e.Text)
    ElseIf item(1) = "low" Then
    l(q).lo = Format(Val(e.Text), "0.00")
    ElseIf item(1) = "pclose" Then
    l(q).pclose = Format(Val(e.Text), "0.00")
    If l(q).pclose <> "" And l(q).pclose <> "#" And l(q).Close <> "" And l(q).Close <> "#" Then
    l(q).c = Format(l(q).Close - l(q).pclose, "0.00")
    l(q).cp = Format(((l(q).Close - l(q).pclose) / l(q).pclose) * 100, "0.00")
    End If
    l(q).flag1 = 2
    ElseIf item(1) = "date" Then
    l(q).Date1 = e.Text
    ElseIf item(1) = "time" Then
    l(q).Time = e.Text
    End If
    Exit For
    End If
    Next
    End Sub
    Am I doing something wrong which inreases CPU usage to 80 or 90 % ?
    Thanks in advance.

    Hi MikeHammadi,
    According to your description, you'd like to get data from another app using NDDE library.
    When using the NDDE library, the CPU usage is high. As the NDDE library is third-party library, it is not supported here. I suggest you checking if the problem is caused by the NDDE library.
    If you'd like to get data from another app. I suggest you could save the data in the dataBase, and then read it in another application if necessary.
    If you have any other concern regarding this issue, please feel free to let me know.
    Best regards,
    Youjun Tang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Reference data from another sheet

    Hey everybody, I am sorry to post here if it has been previously posted. I am looking to use a conditional format  a cell with a value less than 84 to be changed to red. I am using the iPad.
    I also need to reference data from another worksheet.
    Thanks,
    Greg

    I had this same issue, I finally figured you you need a space before and after each ::
    'MY BUSINESS 2014 EXPENSES - Table 1' :: B242

  • Getting Date from a Unix format Timestamp

    Hi there,
    I am having trouble with a WebService i am using to get some information. When i get it, the date of the different data i receive is a timestamp like 1198113192912. This number contains the milliseconds passed since the 1st of January, 1970.
    The thing is that i have been looking for a MF that allows me to get the date in a readable format, but it seems that the timestamps used in SAP are slightly different, and thus, useless for me.
    I would appreciate it a lot if anyone could help me out with this issue, since i do really need to have this sorted out quite soon.
    Thanks in advance
    Diego
    Edited by: di die on Jan 25, 2008 9:41 AM

    Hi there,
    I am having trouble with a WebService i am using to get some information. When i get it, the date of the different data i receive is a timestamp like 1198113192912. This number contains the milliseconds passed since the 1st of January, 1970.
    The thing is that i have been looking for a MF that allows me to get the date in a readable format, but it seems that the timestamps used in SAP are slightly different, and thus, useless for me.
    I would appreciate it a lot if anyone could help me out with this issue, since i do really need to have this sorted out quite soon.
    Thanks in advance
    Diego
    Edited by: di die on Jan 25, 2008 9:41 AM

  • Copy Inventory Master Data to another Item Number

    For the new database setup, I would like to copy from one Item Master Data (all tab details) to another Item Number to save time. Then just edit few fields only. How can I do it?

    Hi Lily,
    If there is provision of changing the item codes then you can try the import from Excel option also. As changing the item codes in an excel list will be much easier than opening each master data and changing the codes.
    Try this-
    1. Go to the test database where you create the test items.
    2. Open the item master data in the find mode and open the search list.
    3. With the f=Form Settings just make those columns visible which you want to import.
    for ex in a DB i have some items, I wnt to import the to other, only the item code, item descrption and the manufactures. then i open the search list and only make these columns visible.
    4. Now export this list to excel
    5. Now change the iem codes of the desired in the excel format.
    5. Save it as a  txt file and import through the "Import From Excel Option"
    Administration> Data Import/Export> Data Import> Import from Excel
    Regards,
    Raj

  • External table: How to load data from a fixed format UTF8 external file

    Hi Experts,
    I am trying to read data from a fixed format UTF8 external file in to a external table. The file has non-ascii characters, and the presence of the non-ascii characters causes the data to be positioned incorrectly in the external table.
    The following is the content's of the file:
    20100423094529000000I1 ABÄCDE 1 000004
    20100423094529000000I2 OMS Crew 2 2 000004
    20100423094529000000I3 OMS Crew 3 3 000004
    20100423094529000000I4 OMS Crew 4 4 000004
    20100423094529000000I5 OMS Crew 5 5 000004
    20100423094529000000I6 OMS Crew 6 6 000004
    20100423094529000000I7 Mobile Crew 7 7 000004
    20100423094529000000I8 Mobile Crew 8 8 000004
    The structure of the data is as follows:
    Name Type Start End Length
    UPDATE_DTTM CHAR 1 20 20
    CHANGE_TYPE_CD CHAR 21 21 1
    CREW_CD CHAR 22 37 16
    CREW_DESCR CHAR 38 97 60
    CREW_ID CHAR 98 113 16
    UDF1_CD CHAR 114 143 30
    UDF1_DESCR CHAR 144 203 60
    UDF2_CD CHAR 204 233 30
    DATA_SOURCE_IND CHAR 294 299 6
    UDF2_DESCR CHAR 234 293 60
    I create the external table as follows:
    CREATE TABLE "D_CREW_EXT"
    "UPDATE_DTTM" CHAR(20 BYTE),
    "CHANGE_TYPE_CD" CHAR(1 BYTE),
    "CREW_CD" CHAR(16 BYTE),
    "CREW_DESCR" CHAR(60 BYTE),
    "CREW_ID" CHAR(16 BYTE),
    "UDF1_CD" CHAR(30 BYTE),
    "UDF1_DESCR" CHAR(60 BYTE),
    "UDF2_CD" CHAR(30 BYTE),
    "DATA_SOURCE_IND" CHAR(6 BYTE),
    "UDF2_DESCR" CHAR(60 BYTE)
    ORGANIZATION EXTERNAL
    TYPE ORACLE_LOADER DEFAULT DIRECTORY "TMP"
    ACCESS PARAMETERS ( RECORDS DELIMITED BY NEWLINE
    CHARACTERSET UTF8
    STRING SIZES ARE IN BYTES
    NOBADFILE NODISCARDFILE NOLOGFILE FIELDS NOTRIM
    ( "UPDATE_DTTM" POSITION (1:20) CHAR(20),
    "CHANGE_TYPE_CD" POSITION (21:21) CHAR(1),
    "CREW_CD" POSITION (22:37) CHAR(16),
    "CREW_DESCR" POSITION (38:97) CHAR(60),
    "CREW_ID" POSITION (98:113) CHAR(16),
    "UDF1_CD" POSITION (114:143) CHAR(30),
    "UDF1_DESCR" POSITION (144:203) CHAR(60),
    "UDF2_CD" POSITION (204:233) CHAR(30),
    "DATA_SOURCE_IND" POSITION (294:299) CHAR(6),
    "UDF2_DESCR" POSITION (234:293) CHAR(60) )
    ) LOCATION ( 'D_CREW_EXT.DAT' )
    REJECT LIMIT UNLIMITED;
    Check the result in database:
    select * from D_CREW_EXT;
    I found the first row is incorrect. For each non-ascii character,the fields to the right of the non-ascii character are off by 1 character,meaning that the data is moved 1 character to the right.
    Then I tried to use the option STRING SIZES ARE IN CHARACTERS instead of STRING SIZES ARE IN BYTES, it doesn't work either.
    The database version is 11.1.0.6.
    Edited by: yuan on May 21, 2010 2:43 AM

    Hi,
    I changed the BYTE in the create table part to CHAR, it still doesn't work. The result is the same. I think the problem is in ACCESS PARAMETERS.
    Any other suggestion?

  • How can i get data from another database SQL Server use database link from

    I have a database link from Oracle connect to SQL Server database with user cdit connect default database NorthWind.How can I get data from another database(this database in this SQL Server use this database link)?

    hi,
    u should see following documentation:
    Oracle9i Heterogeneous Connectivity Administrator's Guide
    Release 1 (9.0.1)
    Part Number A88789_01
    in it u just go to chapter no. 4 (using the gateway),,u'll find ur answer there.
    regards
    umar

  • How can I transfer data form one data store to another iview /dats store

    Hello,
    I have two iview and want to transfer the data from my data store (main iview) to the nested iview (or the data store in nested iview)
    Can you give me instructions, how I can implement this with the signal in and outports.
    Thanks
    Bst regards
    thomas
    I

    Hi Thomas
    Pass the output data of one iview to another(by connecting the output of the 1st to the input of the 2nd) and then <b>Signal Out</b> the combined data of the two iviews from the 2nd iView using a <b>event</b>(say, a submit button) from the 2nd iView.
    Connect the <b>signal out</b> to the nested iView(main iView) by composing a <b>Signal In</b> on the nested iView.
    Next, inside the nested iView design layout push the values from <b>Signal In to a data store.</b>
    Now you could access all the data @datastore from any no. of forms inside the nested iViews.
    Regards
    Navneet

  • Is there a way to move multiple Calendar items from one date to another?

    Hello. I have far too many Calendar items every day in my iCal. Until I finally pare them down to a reasonable level, I need to "reschedule" all of my unfinished ToDo items and reminders, to another day, later in the week.
    There doesn't seem to be any "Select All" feature available.
    Is there a way to move multiple Calendar items from one date to another?
    Thanks in advance!

    Still no ideas? Apple, please come up with a fix. Thanks.

  • How to get current date in a specified format ?

    Hi,
    I want to get the current date (java.util.Date()) in the format yyyy-MM-dd HH:mm:ss.
    Can you please tell me as to how to get that ?
    Regards

    I have used the same and the code looks like this. But i am getting java.text.ParseException : UnParseable Date: "Fri Jul 11 13:29:43 CDT 2003"
    The Code is :
    java.util.Date sysDate = new java.util.Date();
    SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    String formatted_date = df.format(sysDate);
    It is erroring out in the last statement !!

Maybe you are looking for

  • Functunality of save view in BW report iview

    Dear all, When SAP BW Query report iview is called in portal, u will get Save view, Bookmark, variableSreen...etc buttons.. When u click on saveview button...it will ask u to save as a view of that report with specific name. My question is, where it

  • Blue outline of unknown orgin when the 4 finger swipe is used...

    When you use the 4 Finger swipe down (display all windows) on my macbook (running snow leopard) i get a blue box and i can't figure out what it is or how to get rid of it it's usually when i'm online ( i use google chrome) I would like to get rid of

  • Can't manipulate single anchor point - only move entire path

    Neither using the direct selection tool nor holding command (I'm on OS X) while using the pen tool will allow me to move individual achor points, I am only able to move the entire path. I can add and delete anchor points, but I am only able to contro

  • SSD storage usage in Exalogic

    I am trying to understand the difference between the SSD/Flash components located in various elements of Exalogic. I have read most of the Oracle docs and some of the blog stuff, but there is some confusion as Exadata drifts into the text. So it is n

  • Transferring files through java web service(for VB Client)

    Hi, I have a VBA client that needs to access a file on a server through a web service ? how do I go about this ? Use SAAJ ? Can I create a VBA client for SAAJ ?