Parsing date and time info

Hello,
Could you please help me find the date and time out of this output :-
1094130971507 ?
The following code resulted in this output,
Date now = new Date();
DateFormat fmt = DateFormat.getDateTimeInstance(DateFormat.SHORT,
DateFormat.MEDIUM, Locale.US);
String timeFrame = fmt.format(now) + " " + frame; // frame = some data
try {
File histFile = new File("logfile" + (new Date()).getTime() + ".txt");
FileOutputStream histStream = new FileOutputStream(histFile);
printWriter = new PrintWriter(histStream, true);
catch(Exception e) {
System.out.println(e);
printWriter.println("OUT " + timeFrame);
I tried to tokenize the logfile and read the date and time value by using the StreamTokenizer and I have the data as 1094130971507 in the double st.nval. I have to extract the time information alone from this double.
Does some have a smart idea ?.
Thanks in advance,
Domnic

Could you please help me find the date and time out
of this output :-
1094130971507 ?
printWriter.println("OUT " + timeFrame);You are claiming that the first was the result of the second?
Not with the Sun VM it doesn't.
The following code...
DateFormat fmt = DateFormat.getDateTimeInstance(DateFormat.SHORT,
DateFormat.MEDIUM, Locale.US);
String timeFrame = fmt.format(now) ...
Is going to produce the following output....
1/27/05 1:28:25 PM

Similar Messages

  • How do i show date and time info of videos in Iphone as they appeare before import in iPhoto?

    How do i show date and time info of videos in Iphone as they appeare before import in iPhoto? or even as they appear on the iPhone itself? The selection on tool bar for show info is greyed out.

    Welcome T G Brown to the  iMovie boards..
    the socalled timestamp is within the imports.. if you select a clip in iM and hit the key combo Apple-I, you can see recording time and date.
    unfortunately, this info isn't delivered to any software. Bruce Gee (geethree.com, excellent plug-in maker) told us, there's no 'API' he could use for such a feature...
    same on the pro side, read this discussion at the FinalCutExpress boards:
    http://discussions.apple.com/message.jspa?messageID=7982935
    Forum member Ian offers a solution with a 3rd party app ....
    so: pen&pencil and typing timestamp manually into any 'Title' seems to be your only option...

  • How to know date and time information from Trace File defaultTrace.X.trc?

    Hi, all.
      i'm using EP 6.0 SP9 patch 1.
      As you know, default trace is written in the <SID>\JC00\j2ee\cluster\server0\log\defaultTrace.X.trc.
      By using the default trace formatter, it shows like the following sample messages.
    #1.5#0011110E7B2000590000000100000A100003EC71562E6EBC#1104396451585#com.sap.jms.server.ServerClientAdapter##com.sap.jms.server.ServerClientAdapter#Guest#18####716257115a3f11d9b73b0011110e7b20#SAPEngine_Application_Thread[impl:3]_23##0#0#Error#1#/Applications/JMS#Plain###JMS internal error at ServerClientAdapter! JMS Service is not started!#
      My questions are
      1. how do we retrieve the date and time information from the above message? It seems that this message has date and time info because LogViewer shows the date and time based on the above message.
      2. how do we change the above date format to easier one
    like "YYYY:MM:DD:hh:mm:ss"? i know that it can be configured from the Visual Admin --> Services --> Log Configurator but i don't know the exact place for the trace file.
      Thanks.

    Hi Sejoon,
    I use the standalone Logviewer to read the log files. Works great.
    "If you have an SAP Web Application Server Java 6.20 or below you may also get a standalone_logviewer.zip file at the SAP Service Marketplace at service.sap.com/download &#8594; SAP NetWeaver &#8594; Release ‘04. In this case JDK version 1.3 or higher must be installed on the system. The java version must be same on the server and the client.
    In the SAP Web AS Java 6.30 installation a folder named logviewer_standalone can be found under: <path Of J2EE installation>/<SysID>/JC<nr>/j2ee/admin/logviewer_standalone. Verify that the batch file logviewer.bat is installed in the directory logviewer-standalone.
    (source -> http://help.sap.com/saphelp_nw04/helpdata/en/e4/540c404a435509e10000000a1550b0/frameset.htm)
    Best wishes,
    Noel

  • How can I put current date and time in Photo Info (Print module)?

    I often use the Photo Info option in the Print Module to caption my proofs with File Number plus the date and time the print is made.  This allows me to match up the print to the History state for the image, so I know which print version I'm looking at.  I've always wanted to get Lightroom to automatically enter the date and time the print is made.  It obviously knows this info, since it stamps the History state with date and time.  Currently I have to modify my caption manually with Custom text each time I make a print.  This is a major PITA.  Has anyone figured out how to get Lightroom to do this?

    There is a Date/Time title in the titles browser, does just what it says...

  • How can I display the date and time from the playhead info as a subtitle ?

    Is there any way it is possible to display the video capture data and time during playback. I have seen some discussion on creating subtitles to do this, it would be nice if one could simply add a Title template with display fields for playhead information so that it automatically gets created during rendering.
    In case you are wondering why on earth anyone would want this, I would like to use this for display on multisport racing videos.
    Thanks

    There is a Date/Time title in the titles browser, does just what it says...

  • How do I have photos in iPhoto display on their face the date and time?

    How do I have photos in iPhoto display on their face the date and time? Displaying in the camera shows this. When I check edit the info is there. How do I have that displayed on the face of the photo when I view it in iPhoto?

    How do I have photos in iPhoto display on their face
    the date and time? Displaying in the camera shows
    this. When I check edit the info is there. How do I
    have that displayed on the face of the photo when I
    view it in iPhoto?
    Hi! My name is Tom from San Diego, CA. I have the exact same question as you. That is, I would like to be able to print out a photo from iphoto with the date that picture was taken displayed on the face of it. In this way, someone looking at that picture in a photo album years later would know when it was taken. Did you ever find a method to print copies of photos out of iphoto with the date displayed on the print? Thanks for your help!

  • Date and Time dimensions

    After reading the following article, I have decided to use SSAS dimension wizard for generating our Date dimension, which creates a DATETIME PK.
    http://www.made2mentor.com/2011/05/date-vs-integer-datatypes-as-primary-key-for-date-dimensions/ 
    I have also created a separate Time dimension as granularity of an hour is required.
    The Time dimension is very simple and only contains a surrogate key (INTEGER) and actual time in hours (VARCHAR).
    DimTime(TimeKey, TimeInHours)
    Our Fact table will now have a link to both the Date and Time dimension using the PK's.
    Our analysis is required by hour, day, week, month and year.
    My query is; Will this current structure cause any problems when creating MDX scripts to analyse our data (i.e. drilldown and rollup queries) Hour - Day - Week - Month - Year

    Hi Darren,
    According to your description, there a day and hour granularity in your fact table, so you want to a hierarchy like Hour - Day - Week - Month - Year, right?
    In your scenario, you created a time table that only contains a surrogate key (INTEGER) and actual time in hours (VARCHAR). We cannot create a Hour - Day - Week - Month - Year hierarchy without ant relationship between date table and time table. As per my understanding,
    you need create a foreigner key in time table, and join those table in the data source view, then you can create such a hierarchy. Here are some links about create time dimension, please see:
    http://www.ssas-info.com/analysis-services-articles/59-time-dimension/1224-date-and-time-dimensions-template
    http://www.codeproject.com/Articles/25852/Creating-Time-Dimension-in-Microsoft-Analysis-Serv
    Regards,
    Charlie Liao
    TechNet Community Support

  • Incrementing a string number for date and time

    There are probably a lot of ways to do this, but I only want to use a bunch of if - else loops if I really need to.
    I have a date and time for input, let's say 2006-04-19 22:00. In Java, if I convert that to 3 integers (year, month, day), it will output 2006-4-19. I need to be able to increment in a loop for every day and month from one date to the next. If I keep it as a string, I won't be able to increment the value though, (at least I'm not sure how). I'm thinking that even if I converted it to an integer and back to a string, that the leading zero would be removed.
    I found a post here that said something about formatting the number with 2 numbers, by using:
    DecimalFormat format = new DecimalFormat("00");
    format.format(1, sb, new FieldPosition(0));
    Or is there a way to use the gregorianCalendar stuff that would output the date with all of the zeros in place, while incrementing and looping correctly?
    Thanks.

    I would get a Date object--you can use java.text.SimpleDateFormat if you're starting with a String--and use that to create a GregorianCalendar. Then you can just call Calendar's add method to add one to whichever field you want. Use the SimpleDateFormat to turn the date back into a String for display again.
    Calculating Java dates: Take the time to learn how to create and use dates
    Working in Java time: Learn the basics of calculating elapsed time in Java
    Formatting a Date Using a Custom Format
    Parsing a Date Using a Custom Format

  • How can i see the date and time of iPhone pictures, How can i see the date and time of iPhone pictures

    I would Like to know where i can see the date AND time on a picture i take With My iPhone? AND if not on the phone automaticly,.. Why not?... If even the cheapest phones provide this BASIC info.

    You can get this info if you have iPhoto for your phone (costs $5) - you can also try out the app I made (free) https://itunes.apple.com/us/app/photo-date/id605218393?ls=1&mt=8 Would love to know what you think!

  • How to get the current data and time of SCOM server via SCOM SDK (API) calls?

    Hi,
    I need to read the current date and time of SCOM server via SOM SDK.
    Is there a class in SDK that provides this info ?
    Thanks,
    satheesh

    To get time and date of Alerts of SCOM, You can use following command let "get-scomalert"
    Also, You can refer below links
    http://blog.tyang.org/2013/02/21/using-scom-2012-sdk-to-retrieve-resource-pools-information/
    Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question, please click "Mark As Answer"
    Mai Ali | My blog: Technical

  • Get-Hotfix InstalledOn property not returning hotfix installed Date and Time on Windows Server 2008 SP2 but works on Windows Server 2008 R2 SP1

    Hi,
          I am working on a validation script to get the list of hotfixes installed on Domain Controllers every month as part of our monthly DC patching process. I have been successful in getting these details for DC's with (Windows Server 2008
    R2 SP1, Powershell v2.0) using the below command. 
    Get-HotFix -cn $computer | Select-Object PSComputerName,HotFixID,Description,InstalledBy,InstalledOn | where InstalledOn -ge (Get-Date -Day 1 -Format d) | FT -AutoSize
    I execute the above from a jump box with powershell v4.0 (Server 2008 R2)
    However, when I try the same command from the jump box to query DC's with (Server 2008 SP2, powershell v2.0). It doesn't return the InstalledOn date and time. It was giving error for the InstalledOn property and hence I renamed it to $_.InstalledOn. Now
    I don't get error but still no details displayed for InstalledOn property.
    I tried using the below, as could see on few forums that this might resolve the issue. I also tried removing the "where" part but still no installation date returned. 
    Get-HotFix -cn $computer | Select-Object HotFixID, Description, InstalledBy, @{l="InstalledOn";e={[DateTime]::Parse($_.psbase.properties["installedon"].value,$([System.Globalization.CultureInfo]::GetCultureInfo("en-US")))}}
    | where {$_.InstalledOn -ge (Get-Date -Day 1 -Format d)} | FT -AutoSize
    Have tried this locally on the 2008 SP2 DC but still not working. Please advise what is going wrong? 
    Note: If I execute the below command locally on the 2008 SP2 DC, I am getting the InstalledOn output. However, when executed from the jump box with powershell v4.0 (Server 2008 R2) to query
    the same 2008 SP2 DC, it just gives the prompt again without any error or output. This behavior is consistent for other 2008 SP2 DC's in the environment.
    Get-HotFix -cn $computer | Select-Object HotfixID,Description,InstalledBy,InstalledOn | where {$_.InstalledOn -ge (Get-Date -Day 1 -Format d)} | FT -AutoSize

    Hi jrv, I have already tried the Win32_QuickFixEngineering option, which doesn't work either. Apologies for not mentioning the workarounds that I have already tried.
    Get-Hotfix seems to be just a wrapper for Win32_QuickFixEngineering as per the below article. (http://technet.microsoft.com/en-us/library/hh849836.aspx)
    I have seen a mention of using the WU ActiveX control on few forums, but was too lazy to read it through.
    After rigorous testing, it makes me realize that somewhere the Get-Hotfix dates formatting\comparison isn't working. 

  • Date and Time in the flat file

    Hi All,
    I am trying to design a flow which will get data from a flat file. The file has a field which contains both the time and date. How can I handle this in BW? Do I need to creat 2 infoobjects and split the flat file field in start routine or transfer rule? Or is there any stadard infoobject which can hold both the data and time?
    Also, the client asked me if I want a .CSV file or .XLS file. Which one is better for uploading into BW? Any PROS and CONS?
    Best Regards,

    Hi,
    There is no single Data Type which accepts the Date and Time. Other way is to look the data as CHAR. Else the Update Routine/Formula is the Best
    In the Update Rule or Transfer Rule use the Formula
    Let the Info Objects be
    0date
    0Time
    The Transfer Rule/ Update Rule Formulas Be
    0Date --> LEFT( 8, 'DateTime' )
    0Time --> RIGHT(6, 'DateTime')
    Then CSV is the best Option to accept the Data as it is ready for Upload
    Regards
    Happy Tony

  • How do you date and time stamp pictures and videos using a EOS Rebel T3?

    I am needing to utilize date and time stamping on videos and photos in my work.  The pictures and videos must display time, a date, and reference number.  I have gone through the cd, owner's manuel and software manuel and I am unclear if I can perform this function. 

    While this is a relatively common feature on point & shoot cameras -- where the photo is thought of as a snapshot to document a memory in a person's life, among DSLR cameras it's not very common (I don't actually know of a DSLR that does this though I don't doubt that it may exist).  DSLR users are usually expecting a higher quality image -- so now the image is thought of more like art and less like a snapshot and the date/time in the corner distracts from the image.  Also they tend to be more advanced users who would be able to modify the image themselves so they have little need for such a feature.
    The camera does record the date & time... but it's in the EXIF data (information recorded into the image file but not displayed).  
    SO... there are programs that will just do this.  You'll need to do a search (I found several but have never tried one so I can't vouch for them).  I think there are Photoshop plug-ins that do this (assuming you have Photoshop). These programs allow you to define the info you want printed (including EXIF data such as date/time) and you get to pick the location, font, size, color, etc. and ultimately the location on the image where you'd like the info displayed.  They then add the info visibly onto the image for you and most support "batch" use (e.g. drop a whole folder of images on it and they'll do them all.)
    Tim Campbell
    5D II, 5D III, 60Da

  • CRYSTAL REPORT GRAPH WITH DATE AND TIME

    Post Author: Dino Dentone
    CA Forum: Charts and Graphs
    Dear forum,
    I am developing a Visual Studio .net 2005 Windows Form,i have a sql table with 2 field:1) DATA (date and time)2) Temperatura (numeric)I have to make a line graph with numeric data axes.I have insert two parameters' to customize the filtering, so i can have a graph of the temperature between to date and time.If i choose two date's and time (parameters) like 20/04/2008 00:00:00 trought 20/05/2008 00:00:00 i have no problemBut if a choose a range minor of 1 day (some hours like from 15/05/2008 00:00:00 trought 15/05/2008 08:00:00) i have no graph.It sound like it don't use the time values?Thank's for the Help.

    There is some debugging info on the website. I've had problems getting the text to work. It was generally that I installed either the wrong 'version' of ImageMagick (the recommended one works for me--I'm running Vista x64 and one time installed the x64 version and it didn't work). I also installed Ghostscript to get the font list to work correctly. At one time I installed the x64 version of Ghostscript and it didn't work with the plug-in, either.
    I installed two items:
    ImageMagick: ImageMagick-6.4.9-3-Q16-windows-dll.exe
    Ghostscript: gs863w32.exe
    I don't know if it is necessary but I also added the fonts from
    ghostscript-fonts-std-8.11.tar.gz to the c:\Program Files (x86)\gs\fonts directory. Some, none, perhaps all, may already be installed just by installing ghostscript--it has been so long that I don't remember exactly. I do know that the contents of the gs fonts directory contains all the files in the .gz, I just don't remember if I put them there separately or as part of the gs install :)
    You need to make sure the font size is large enough. I usually use about 2-4% of height and export a single photo to make sure I see the text correctly.
    Tim does respond to email when he can so if you can't get it to work you can always drop him a line.

  • Current date and time

    What is the simpliest call in Visual C++ with Measurement Studio to extract the current date and time? I am trying to have such info as 1315032804 for March 28th, 2004 at 1:15 pm. Thanks in advance for your advice.

    There are a few options, depending on what format you want the time and what kind of operations you're planning to do with it:
    ATL/MFC - CTime::GetCurrentTime
    ATL/MFC - COleDateTime::GetCurrentTime
    Win32 - GetSystemTime
    Win32 - GetLocalTime
    href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_time.asp">C r...
    C runtime - _ftime
    - Elton

Maybe you are looking for

  • G5 won't startup from any source w/out kernel panic

    I've got a Power Mac G5 dual 2GHz 1.5GB RAM, 160GB HD. It's running 10.5.6. It kernel panicked the other day while I was at work and when I came home the fan was running really loudly and the screen o' death was up. Tried restarting a few times and e

  • Using Downcasting to execute a method.

    Hi, I am trying out an example of Downcasting abstract class Action{       public void execute(); class Thirst extends Action{        public void execute(){        System.out.println("Drink Water"); class Hunger extends Action{        public void exe

  • Building Shared Object for LabView

    All; I'm trying to build a C++-based shared object to be called from LabView and use SunCC instead of gcc. The compile stage looks like:danny@traveler:~/tubes/dielectric/rod_software/lookup> make -f Makefile.unix suncc=1 sunCC -I/usr/local/lv71/cinto

  • 10g listener cannot start after install 11g

    Hi, I install 11g R2 into one of 10g windows 2003 server, but I did not perform upgrade, I want the 11g coexists with 10g. But after I install 11g and create a new 11g instance, I found that the listener cannot be started, until I change the environm

  • LU04 qty should be confirmed in background..

    Dear Experts, While doing GRN wrt PO and receiving in Quality stock. TO confirmed in Interim bin and stock updated in Interim only. After that, Through LT01, partial stock moved to Bin. Now in QA32, batch released and stock posted to both Unrestricte