Get the created time stamp of a file...

Hi Guys,
I am trying to get the created time stamp of a text file from oracle... How is this possible? I tried using UTL_FILE but didnt succeed so....
Thanks...
Edited by: Napster on Oct 21, 2010 12:43 AM

You may try something like this.
create or replace and compile java source named filehandler as
import java.lang.*;
import java.util.*;
import java.io.*;
import java.sql.Timestamp;
public class FileHandler
  private static int SUCCESS = 1;
  private static  int FAILURE = 0;
public static Timestamp lastModified (String path) {
    File myFile = new File (path);
    return new Timestamp(myFile.lastModified());
  }Then the wrapper
CREATE OR REPLACE FUNCTION lastModified (p_path  IN  VARCHAR2) RETURN DATE
AS LANGUAGE JAVA
NAME 'FileHandler.lastModified (java.lang.String) return java.sql.Timestamp';PS: Not tested.

Similar Messages

  • How do you vary the Date/Time stamp format in File Adapters

    In the receiver channel of the File Adapter where you specify the 'File Name Scheme', you do have the option of specifying a 'File Construction Mode' of 'Add Time Stamp'.  How can you specify a different Date/Time stamp format ( eg MM/DD/YY vs YYYYMMDD vs MMDDYY, etc. ) without changing the Date/Time stamp for the entire SAP system?  Also, can you control where the Date/Time stamp appears in the filename?

    Hi,
    There are many threads discussing the same issue. Go thro the following:
    Dynamic file name (Date) in Receiver File Adapter
    Receiver File Adapter - TimeStamp
    Bhavesh's reply in above thread:
    You can use Adapter Specific Identifiers and then change the file name in the mapping. Append the tiem stamp in the format that you want and so on.
    Just use this code in an UDF,
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String SourceFileName = conf.get(key);
    java.text.SimpleDateFormat dateformat = new java.text.SimpleDateFormat( "yyyyMMdd" );
    dateformat.format( new java.util.Date() );
    String newfilename=SourceFileName+dateformat;
    // change to new file name
    conf.put(key, newfilename);
    return "";
    Regards,
    P.Venkat

  • How do I to get the date/time stamp back on my texts in ioS7?

    I've looked and looked to find an option and I can't seem to locate one.  Does anyone know how to put the date/time stamp back...?  It does appear in, but not consistently.

    Swipe right to left and they will appear as you need them.

  • To Create Time stamp in dump file during export

    Hi All ,
    While exporting table thDIRECTORY=USER_DATA_PUMP_DIR
    DUMPFILE=expdp_tables%U.dmp
    LOGFILE=expdp_tables.log
    CONTENT=ALL
    PARALLEL=4
    ESTIMATE=STATISTICS
    SCHEMAS=<Schema name >
    When i ran the shell file i am getting dump file generated as
    expdp_tables01.dmp
    expdp_tables02.dmp
    Could any one help how can i get the time stamp attached to the dump file .Its urgent kindly help me in this
    Thanks

    Munich,
    Thanks for ur suggestions and the same need to be imported how can i do it in the import operation while my import par file has
    DIRECTORY=DATA_PUMP_DIR
    DUMPFILE=expdp_tables%U.dmp <<how can i get the sydate.dmp>>
    LOGFILE=impdp_EIM_tables.log
    CONTENT=DATA_ONLY
    PARALLEL=4
    TABLE_EXISTS_ACTION=TRUNCATE
    EXCLUDE=GRANT
    EXCLUDE=STATISTICS
    EXCLUDE=TRIGGER
    What are the option that i can give to get the sysdate.dmp in the par file that i have got from
    mv exp.dmp exp.dmp.`date "+%d.%m.%Y"`
    or can i give
    DUMPFILE=expdp_tables%U'date'.dmp like that
    Thanks

  • Why do all documents get the same time stamp?

    All files show the same creation time, 19.21, even those created today before that time. I have a new PowerBook Pro 17" running 10.6.8.

    Go to System Prefs > Language & Text > Formats.  In the Times section, click Customize.
    Everything in the four lines at the top should be "elements" dragged from the lower section, not actual numbers.

  • Acquiring multiple voltage and current sine waveforms, and log them along with the respective time stamp in a file."

    "I am doing a data acquisition project using a 16 channel N.I. series 6020E card where I want to capture respective current and voltage sinusoidal signals. I am planning on capturing four pairs of matching current and voltage signals. I planned on taking one reading across the channels every fifteen minutes. This reading will need to be 60 data points per period or 3600 readings per second per channel in order for me to recreate the sine signal to determine the phase angle difference between the voltage and current. I was able to get one channel to capture a signal but could not get more than one working at a time. I am also trying to sycronize the data collection so all samples are with respect to each other. Thanks for any help."
    -posted by cappy on 2/11/2002
    John N on 2/12/2002 answered:
    "Hi Cappy,
    Could you post this question to the Hardware > Counter/Timer or Hardware > Multifunction I/O forums? I think you will get more responses there. Here is a link.
    The hardware is usually a better differentiation since software can support such a huge range of functionality.
    The data rates you are talking about sound reasonable. Are you using the USB or the AT interface?
    One other thing to be aware of is that the samples taken will not be simultaneous due to the multiplexed nature of the MIO board measurements. However if you know the channel clock rate(output from one of the VI's), then you can calculate the time difference between each measurement and correct your phase measurements by that amount.
    If you have more questions, please post this to the other forum and copy all of our discussion to let everyone know what we have talked about already.
    Best Regards,
    John Nieri
    Applications Engineer
    National Instruments"
    I am using the USB connection. If anyone can help with or has a similar VI for this, it owuld be appreciated so I can work on the larger aspect of the total project.

    The easiest VI to use for this acquisition is AI Acquire Waveforms in the data acquisition palette in LabVIEW. This VI allows you to perform a finite acquisition from multiple channels on your DAQ board. As John mentioned the acquisition from individual channels will not be truly simultaneous. There will be a slight time shift from one channel to the next on the order of the maximum acquisition speed of the card, 100kHz or 10 microseconds in your case. By accounting for this 10 microsecond delay between consecutive channels you can properly calculate the phase shift between voltage and current.
    Christian L
    NI Consulting Services
    Christian Loew, CLA
    Principal Systems Engineer, National Instruments
    Please tip your answer providers with kudos.
    Any attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system,
    or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject
    to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense

  • How to get the lastmodified time of an existing file?

    hi,
    there are some files sitting at server side, I want to monitor when the file is modified. could anyone show me some code for doing this?
    Thanks!
    Euncie

    import java.io.*;
    import java.util.Date;
    class LastModifiedDemo{
         public static void main (String args[]){
              File f = new File("test.txt");
              System.out.println(new Date(f.lastModified()));
    }well, you should not get zero, try this, you will get a date

  • Customizing Time Stamp In Receiver File Adapter

    Hi,
    I am working in a XI to file adapter scenario.
    The default time stamp in receiver file adapter is yyyyMMdd-HHmmss-SSS.
    I want to time stamp as "ABC_MM_DD_YYYY_HH_MM_SS".
    i searched SDN,but not getting an end to end approach.
    Like...I developed a UDF ,but when I map it to receiver root node..I am getting error.
    Please help.
    Just request for a step by step procedure.
    Also,ASMA is not v clear to me......
    Plzzzzzzzzzzzz help!!
    Regards.

    Hi sriparna,
    The timestamp used by the File Receiver Adapter is a default pattern, to achieve that you have to use a UDF in the middle of the MM and set the receiver file name with the ASMA, read this for further information:
    ´´´´ Dynamic Configuration vs Variable Substitution - The Ultimate Battle for the File Name
    /people/shabarish.vijayakumar/blog/2009/03/26/dynamic-configuration-vs-variable-substitution--the-ultimate-battle-for-the-file-name
    It really helps,
    regards,
    Juan.

  • Retaining date/time stamp when copying files from a backup network drive

    How do I retain the date/time stamp when copying files from a backup such as a external drive or a network drive?

    i don't trust MA at all. known to create a lot of problems.
    instead, see the green box in this user tip.

  • Adding the date/time stamp to videos already created

    We have someone using Elemets 8
    They need to add in the date/time stamp to video's that are already created.
    The camcorder we have does record this information but doesn't allow that information to be put onto the screen its a Canon HD HF200
    We were told by Adobe support we can do this but they wanted $39 plus $39 an hour.
    Anyone out there able to tell me how we can get this done for free?

      Try the Premier Elements forum for video questions. You will get better advice over there. Good luck.
    http://forums.adobe.com/community/premiere_elements

  • How to get the last time a record was modified or created ?

    Is there a way (hidden system fields for example, system view, other ?) to get the last time a record of a table was modified or the date it was created.
    Thanks for any help.
    Stiphane CAMPION

    blarman74 wrote:
    I know I could do this with a trigger, but I was wondering if there is a data dictionary view I can query to find the date/time a table was last updated. What I have is a table that is constantly getting hammered with new data being uploaded from a third party. We need to keep close tabs to verify that this datafeed is constantly running and bringing in new data. Because the data that comes in comes from multiple timezones and there are hundreds of lines, our attempts at monitoring by just looking at the data leave something to be desired.
    Any ideas?refer this links
    How to find Last modified/updated time of a particular table
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1590655700346557237
    Thanks

  • How can i add a time stamp to tdms file?

    I want the data and the time for the tdms file generated?
    how can i do that?
    should i cinvert .tdms to .lvm and use the data storage option or excel add on option for .lvm file created?
    cant i directly have the time stamp for tdms file generated?

    How are you acquiring the data in the first place?  That will matter in how we want to approach this.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Need to change Date/Time stamp on jpeg file

    I combine images into panoramas using PTGUI. The problem is that the output image file is date stamped as the time that I created the image. I really want the date/time stamp to be the same as the images that go into the panorama. I cannot find a way in LR to change this.
    Lee

    > By the way, Victoria, should you be promoting your url here? It belongs in your profile. It's in the forum rules somewhere and others have been picked up on it before.
    >
    > Joe
    Oh, thanks Joe, I'll change that then. I did go looking for forum
    rules, but couldn't find any!
    Victoria

  • Enabling the Local time stamp on Sales Order, Delivery, invoice & PO

    Hi SAP experts,
    I need the valuable inputs for the following requirement- the user ( India based)want to see the local time stamp on transactions VA01(Sales Order), VL01N(Delivery) and VF01(Sales Invoice), ME21N(PO). The system is currently fetching the Malaysian time on these.(invoice and delivery).
    A small info about the issue: As India is 2.5 hrs behind Malaysian time so at 9:30 pm India time system date changes to the next day for us and any invoice done after 9:30 pm is showing next day's date. Also the time reflected on the Invoice is Malysian time which should be actually the local time. As per user, it is a non compliance on regulatory front.
    To simulate the issue we have created an invoice on 3rd Jan at 4:01PM Indian Std time but the time reflected on the invoice is 18:31 which is MY time.
    Also provide help in where to see the time settings for these sales documents?
    I am new to the SAP, All the valuable suggestions are highly appreciated.

    Dear All,
    With the help of security team, we tried to change the Personal time Zone ( of the user) maintained in SU01-Defaults tab to INDIA , but did not get the expected results. THE SYSTEM TIME ZONE JUST MAINTAINED BELOW PERSONAL FIELD IS SHOWING UTC+8.
    After the change , the invoice created at India time is reflecting +2.5 hrs ahead time.
    Pls Suggest , how to acheive this. Any example ecenario can help a lot.
    Thanks a lot in advance for the support.

  • Remove the comment time stamp in a PDF document

    Does anyone know what's the best way to remove the comment time stamp from a document?
    thanks

    Do you mean that you want to remove the timestamp of a particular comment? If so, there are two timestamps associated with a comment, the creation date and the modified date. The modified date is what's shown in the comments list in Acrobat/Reader and can be altered by a script, but the creation date will still be present though unseen and unmodifiable directly with a script. It's possible to export the comments to a data file (FDF/XFDF), edit the file to remove/replace any timestamp info, and re-import the comments into a copy of the file that doesn't have comments. So the best approach really depends on what it is you're trying to accomplish.

Maybe you are looking for