Help adding current Date and Time stamp to file name

I need help with my script adding current Date and Time stamp to file name.
This is my file name = myfile.htm
I would like to save it as = myfile.htm 8/29/2007 11:41 AM
This is my script:
<script>
function doSaveAs(){
     if (document.execCommand){
          document.execCommand('SaveAs','1','myfile.htm')
     else {
          alert("Save-feature available only in Internet Exlorer 5.x.")
</script>
<form>
<input type="button" value="Click here to Save this page for your record" onClick="doSaveAs()"
</form>
Thank you

I agree, I guess I overlooked that!
I would like to save it as = myfile 8/29/2007 11:41 AM .htm
I need help with my script adding current Date and Time stamp to file name.
This is my file name = myfile.htm
I would like to save it as = myfile 8/29/2007 11:41 AM .htm
This is my script:
<script>
function doSaveAs(){
if (document.execCommand){
document.execCommand('SaveAs','1','myfile.htm')
else {
alert("Save-feature available only in Internet Exlorer 5.x.")
</script>
<form>
<input type="button" value="Click here to Save this page for your record" onClick="doSaveAs()"
</form>

Similar Messages

  • Need current data and time stamp in Java mapping

    Hi All,
      I am doing the scenario as file to mail. so here i am using java mappings for sending the file in mail attachment.
      I have done my java mappings and its executed successfully. File is going successfully to third party.
      Business wants date and timestamp in subject line.
    Currently i am using mail subject line as EDI File. 
    But business needs the date and time in the subject line after EDI File as EDI File <yyyymmddhhmm>.
    So my requirement here is adding the date and timestamp.
    Can any one suggest how can write java code to acheive.
    Thanks
    Bhaskar
    Thanks,
    Bhaskar

    Hi Bhaskar,
    >   Business wants date and timestamp in subject line.
    1. Add the import statments at beginning
    import java.util.Date;
    import java.text.SimpleDateFormat;
    2. Add these statments to get timestamp and Concatenate the subject line with string currentdate.
    SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmm");
    String currentdate = sdf.format(new Date());
    subjectline = subjectline.concat(currentdate);
    Regards,
    Sunil Chandra

  • Date and time in spool file name

    Hi,
    can anyone show me how i can write the code below so that the spool file will automatically take the system time and date?
    thanks again.
    set term off;
    set echo off;
    set heading off;
    set linesize 1500;
    set pagesize 9999;
    set feedback off;
    spool /home/oracle/ATM_Upload/files/CRD000119MMDDYYHHMISS.DAT;
    SELECT rec_ind||source_type||bbdsa_code||seq_num||dt_ti_ext||ver_num
    as atm_header
    FROM atm_dc_hd;
    spool off;

    Hi,
    I do something similar to this in a file called ed.sql which I use in SQL*Plus to give me a history of SQL*Plus buffers in separate files which follow the naming convention $DATABASE_$SID_$TIMESTAMP.sql. I use it from SQL*Plus when editing, rather than typing "ed" I type "@ed" and it does the naming for me:
    -- Turn off terminal output
    set termout off
    -- Save current buffer to a temp file
    save tmp.txt replace
    -- Set editfile name to $DATABASE_$SID_$TIMESTAMP.sql
    column fname new_value fname
    column sid new_value sid
    select trim(sid) sid
    from v$mystat
    where rownum = 1;
    select global_name||'_&sid'||'_'||to_char(sysdate, 'YYYYMMDDHH24MISS')||'.sql' fname
    from global_name;
    set editfile '&fname'
    -- Retrieve our initial buffer
    get tmp.txt
    -- Turn terminal output back on
    set termout on
    -- Fire up the editor
    edYou could probably adapt this in the following way for your needs:
    column fname new_value fname
    select 'CRD000119'||to_char(sysdate, 'MMDDYYHH24MISS')||'.dat' fname
    from dual;
    spool '&fname'I don't know how you get the 'CRD' part of the filename but you may be able to generate that too using the above as a guide.
    cheers,
    Anthony

  • How to provide date and time stamp to the extracted file.

    I 'm downloading data from DB to Flat file using GUI_DOWLOAD. whenever it is executed it is creating with a file name.
    if i rerun the program the file is overwriting with the same name.
    now based on the requirement how many times i executed, that many times file should be individually created and should be added with date and time stamp.
    like
    if when i executed  at the very first time it should saved with filename, date and time.
    say "Address.txt 04/05/2007 07:55:10"
    When i executed it for second time it doesn't overwrite the file.
    it should create a new file.
    like "Address.txt 04/05/2007 07:59:20".
    Please guide me the way if possible code.
    Thanks in advance.

    Hi Vamsi,
                   Use FM 'F4_PROGRAM' to take file from the user .
    In this case user will enter the file name. u can append date & time to that file path.
    Refer this code.
    CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          PROGRAM_NAME  = SY-REPID
          DYNPRO_NUMBER = SYST-DYNNR
        IMPORTING
          FILE_NAME     = P_P_FILE.
    concatenate P_FILE '04/05/2007 07:59:20' into V_FILE.
    CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                        = v_file
         filetype                        = 'ASC'
          write_field_separator           = 'X'
        TABLES
          data_tab                        = i_tab
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      IF sy-subrc = 0.
        MESSAGE i002.
      ENDIF.
    Reward points if helpful.
    Regards,
    Hemant.

  • Inserting Current Date with time stamp in oracle database

    Hi Experts,
                     I want to insert the current Date and time stamp in a field in the Oracle Database Table.
    I am able to insert date but i am not able to insert the date with time stamp. Any Suggestions??
    Thanks
    Naveen

    Naveen,
    Do you want to get current date (from sysdate) with a specific format or transform a value containing a date/time value to insert it in ORACLE ?
    Usually, you insert current datetimestamp in a date field using this :
    TO_DATE(sysdate,'dd/mm/yyyy hh:mi:ss')
    you may have to tweak the format pattern ('dd/mm....') according to your needs
    if you want to transform a date, use something like this:
    TO_DATE(your_date,your_format)
    but make sure your format is compliant with your date, ie
    TO_DATE('31/12/2008','MM/DD/YYYY') could raise error (litteral does not match) cuz ORACLE can't recognize 31 as a month pattern
    Chris

  • How to get the most current file based on date and time stamp using SSIS?

    Hello,
    Let us assume that files get copied in a specific directory. We need to pick up a file and load data. Can you guys let me know how to get the most current file based on date and time stamp using SSIS?
    Thanks
    thx regards dinesh vv

    hi simon
    i excuted this script it is giving error..
       Microsoft SQL Server Integration Services Script Task
       Write scripts using Microsoft Visual C# 2008.
       The ScriptMain is the entry point class of the script.
    using System;
    using System.Data;
    using Microsoft.SqlServer.Dts.Runtime;
    using System.Windows.Forms;
    namespace ST_9a6d985a04b249c2addd766b58fee890.csproj
        [System.AddIn.AddIn("ScriptMain", Version = "1.0", Publisher = "", Description = "")]
        public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
            #region VSTA generated code
            enum ScriptResults
                Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
                Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
            #endregion
            The execution engine calls this method when the task executes.
            To access the object model, use the Dts property. Connections, variables, events,
            and logging features are available as members of the Dts property as shown in the following examples.
            To reference a variable, call Dts.Variables["MyCaseSensitiveVariableName"].Value;
            To post a log entry, call Dts.Log("This is my log text", 999, null);
            To fire an event, call Dts.Events.FireInformation(99, "test", "hit the help message", "", 0, true);
            To use the connections collection use something like the following:
            ConnectionManager cm = Dts.Connections.Add("OLEDB");
            cm.ConnectionString = "Data Source=localhost;Initial Catalog=AdventureWorks;Provider=SQLNCLI10;Integrated Security=SSPI;Auto Translate=False;";
            Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.
            To open Help, press F1.
            public void Main()
                string file = Dts.Variables["User::FolderName"].Value.ToString();
                string[] files = System.IO.Directory.GetFiles(Dts.Variables["User::FolderName"].Value.ToString());
                System.IO.FileInfo finf;
                DateTime currentDate = new DateTime();
                string lastFile = string.Empty;
                foreach (string f in files)
                    finf = new System.IO.FileInfo(f);
                    if (finf.CreationTime >= currentDate)
                        currentDate = finf.CreationTime;
                        lastFile = f;
                Dts.Variables["User::LastFile"].Value = lastFile;
                Dts.TaskResult = (int)ScriptResults.Success;
    thx regards dinesh vv

  • How to display the current Date and time in xslt version 1

    i am using xslt version 1 .i want to display the current date and time in the output xml using xslt(Jdeveloper) ..i just added the namespace xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
         xmlns:ns1="urn:oracle:integration:b2b:7D30046DC68A4FA689956D8241FA3B99">
    and used thsi function <xsl:value-of select = "xp20:current-date()"/>
    but it does not works for me ..help needed????
    Edited by: user9519185 on Jan 20, 2009 3:04 AM

    Use a formula: =NOW()
    Format the cell for Date and Time, with both the Date part and the Time part displayed. Format the two parts as you wish, using the choices in the Inspector's menus.
    The cell will update each time the table is recalculated.
    (Description is for Numbers '09 (Mac), Numbers for iOS will be similar, but not necessarly identical in details.)
    Regards,
    Barry

  • Current date and time in narrative. html?

    Hello,
    I would like to include current time and date in the narrative of a report. The purpose of this is that when end-users export the report a time and date of export is inlcuded in the export so that I know when specific reports where exported.
    I now have a workaround with added hidden date and time columns and showing only first rows of these hidden columns. This is quite a lot of work since I have to update about 75 reports with this date and time values.
    Does any of you know how to include currentdat and time in the narrative with a html code?
    Or are there other ways to achieve what I am looking for?
    Thanks a lot

    Hi,
    We had similar kind of requirement.
    We have created a repository variable "CurrentDateTime" and added this in each and every report in the narrative view as below.
    Steps:
    1.Leave the existing Table view or chart view as it is.
    2.Add one narrative to the existing report.
    3.Modify the narrative view and paste the below logic in that.
    Current Date: @{biServer.variables.CurrentDateTime}
    Hopes this helps.
    Thanks,
    Pramod

  • I'm trying to display the current date and time on my iPad.

    First, I'm not sure this is a valid post to this forum.  If not, I'd appreciate knowg in where I can get help. 
    I have tried several ways to display the current date and time on my iPad.  None  work.  Most things I try give me complier errors but the latest code compiles but won't display the correct time. 
    Here's the dispatch code in my ViewController.m file:
    dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0ul);
        dispatch_async(queue, ^{
            [NSTimer scheduledTimerWithTimeInterval:NSTimeInterval)1.0f target:self selector:@selector(updateLabel:) userInfo:nil repeats:YES];
    Here's the updateLabel code: (which never gets executed).
    - (void)updateLabel:(id) sender {
        dispatch_sync(dispatch_get_main_queue(), ^{
        NSLog(@"Datefield Update Called");
        NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
        [dateFormatter setDateFormat:@"EEEE, MMMM dd, yyyy 'at' HH:mm  ZZZZ"];
        NSDate *dayTime = [NSDate date];
        NSString *formattedDateString = [dateFormatter stringFromDate:dayTime];
            _dateField.text = formattedDateString;
        [self.view addSubview:_dateField];
        NSLog(@"Datefield %@",_dateField.text);

    Your code is needlessly complicated and has a few problems:
    // These objects should be created only once.
    NSTimer *dateAndTimeTimer; (You might need to make this a property with a strong reference).
    NSDateFormatter *dateFormatter = [[NSDateFormatter alloc]init];
    [dateFormatter setDateFormat:@"EEEE, MMMMM dd, yyyy 'at' HH:mm ZZZZ"];
    // The subview should only be added once.
    [self.view addSubview:_dateField];
    [self performSelectorOnMainThread:@selector(startDateAndTimeTimer)
                            withObject:nil
                         waitUntilDone:YES];
    -(void)startDateAndTimeTimer
        NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:1
                                                          target:self
                                                        selector:@selector(updateLabel)
                                                        userInfo:nil
                                                         repeats:YES];
        dateAndTimeTimer = timer;
        [[NSRunLoop mainRunLoop] addTimer:dateAndTimeTimer forMode:NSRunLoopCommonModes];
    -(void)updateLabel
         NSDate *dateTime = [NSDate date];
         NSString *formattedDataString = [dateFormatter stringFromDate:dateTime];
         _dateField.text = formattedDateString;
         NSLog(@"_dateField.text=%@", _dateField.text);

  • Date and time stamp of user status does not appear

    Hi, gurus.
    For a specific transaction type, the date and time stamps for certain user statuses do not appear within the transaction although these missing date/time stamps are captured in the database upon checking by our ABAP.  It seems that this problem started when I added several statuses and rearranged their status numbers in the status profile last year.
    I'd also like to ask if it's really necessary that the statuses within the status profile and date profile should maintained in the same positions. 
    E.g.
    Status Profile                                                                               
    Status No.     ---       Status Code      ---            Short Text                                       
    10            ---                    IP1L                   ---       In Process 1st Level                        
    20            ---                    IP2L                   ---       In Process 2nd Level                          
    Date Profile
    Display Position   ---       Date Type
    1                          ---       In Process 1st Level       
    2                          ---       In Process 2nd Level
    We're going to create and assign a new status profile for the concerned transaction type.  We'll make sure that this status profile is sychronized with the date profile.  Hopefully, the date/time stamps will all be displayed in prospective transactions but the problem on the missing date/time stamps in historical transactions will still remain.
    Pls. help us.
    Thanks in advance,
    Theresa

    I'd also like to ask if it's really necessary that the statuses within the status profile and date profile should maintained in the same positions.
    No

  • Odd Date for Current Date and Time

    I am modifying a column in a list to get current date and time using =TODAY()+NOW() in the calculated field and get a time that is behind by 1 hour but the date is 4 months 114 years ahead (2128). How can I fix this field?

    http://sharepointsolutions.com/sharepoint-help/blog/2011/04/how-to-add-and-subtract-hours-and-minutes-from-date-and-time-fields-in-sharepoint-lists/

  • 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

  • Wrote the current Date and Time in the backend

    HI everyone,
    I created a table view, where I display several records. Right now I will add an record to this table, which should be written back in the backend and automaticaly add the current date and time.
    But I don´t know to make this. I tried several time with the funktion  "now()", but it doesn´t work. So any help for me, to explain how I can display the actual time and then write it back to the backend?
    Thanks

    we use a crm system. but the BAPI I mentioned was
    just to play with. My basis will develop a new API
    for the project, that have the requested Inputfields.
    But what I tottaly forget was, that there has to be a
    field for the time, so thanks for the advice.
    No Problem.
    I´m still of the opinion , that it should be possible
    to add the curret time in a field with the
    funcionality of the VC, even there is a way to show a
    clock with the current time. My problem is that I
    can´t figuer out how to do this.
    Therefore you can use the TNow() function (Time functions) and the Now() Function (Date functions). You can cast them to a string and concatenate the string, then you have the date of today with the current time. This string you can format and transfer it as input for your BAPI_ADD_BP for example.
    Hope that helps.
    Best Regards,
    Marcel

  • Show active current date and time in a Form continuously

    Hi,
    I am use Oracle Form 10.1.2 in Windows 2000.
    Can we show an active current date and time in a Form continuously?
    Perhaps in the main menu form.
    So the user can see the moving time, instantly when the time change (withour pushing F5 for refreshing the form)
    23-Sep-2006 06:00
    -- one minute later will show
    23-Sep-2006 06:01
    -- one minute later will show
    23-Sep-2006 06:02
    -- and so on
    Any help is appreciated.
    Many thanks,
    Buntoro

    Here is a quick, untested suggestion that sketches out one way of approaching this.
    If you only require updates every 60 seconds, you can use the TIMER built-in to create a repeating timer with a sixty-second delay. Each time the timer expires, update a text item to reflect the current time (obtained by selecting SYSDATE from DUAL on the database.)
    If the time is to be updated precisely when the minute changes, use two timers -- the same one described above, and a one-shot. Before you create either timer, run the following query:
       SELECT 60-TO_NUMBER(TO_CHAR(SYSDATE, 'ss')) FROM DUALThis will give the number of seconds remaining until the minute changes. Use this value to set the duration of the one-shot timer. When it expires, create the repeating sixty-second timer.
    There is a good possibility that this method will not be terribly precise, depending on factors like server resources, user load and network distance. A more network-friendly approach would be to use a JavaBean that relies on the PC's system timer to track the passage of time, and calculates server time based on the observed time difference between PC & server.
    Hope this helps,
    Eric Adamson
    Lansing, Michigan

  • DATE and TIME Stamps

    I'm a relative newbie still having issues with getting date and time stamps on my printed documents.
    I use Preview, Pages, Numbers and also tend to print to PDF a lot, which I am opening in Preview.
    I have found an "Insert" ability in Pages but for some reason it appears to only give me the date that I inserted the Timestamp.
    Can anyone help me figure out my options in Mac for putting the following on a document:
    A. DATE and TIME printed
    B. NAME of document with LOCATION (I assume this is software specific?!)
    Thanks for any help with this.
    - Jon

    Yes, ...and I was hoping to find a solution since I sometimes have the same problem!
    But I'm afraid there is none. For sure I didn't find any fxscript function returning Date&Time. At the moment the best solution I know is what you suggested, Ian: capture twice, once in FCE for editing and once in iMovie for reading Date and Time.
    I'd be glad to write and share a plugin displaying date and time if somebody is able to tell me what fxscript function (if any) should I use...
    Piero

Maybe you are looking for

  • I am unable to get my officejet pro 8500a plus online,

    my officejet pro 8500a plus used to work fine, but recently it is connected to the internet, as is my laptops, but not online - blue light is out.  I even brought a new laptop and still cannot get printer online - so obviously a printer error!!  Plea

  • F110 - Need to take only the down payments

    Hi, We want to consider in F110 only the down payment request lines to be paid. We have configured the special gl in the "All Company Code" data of F110. System is still taking the normal invoices also. How to control it? Regds, Nand

  • HT201210 the iPod "ipod" couldnot be restored. the device could not be found.

    After updating OS on new Ipod toch 4th gen. Using windows 7 64bit app. the device freezes up amd cannot be restored to earlier settings.

  • Managing cookies in Safari 3.1.2

    I am having trouble getting to my cookie information in Safari. I know I am supposed to click on Safari, then preferences and then security but I don't have anything that says security. The only window that comes up when I click on preferences is one

  • Accessing Runtime Information - ERROR - HELP

    Hi all, I am trying to access the runtime MBean with the sample code given in the WebLogic online document Here is the part of the code try {             System.out.println("\n----Trying to access runtime mbean \n"); mbeanSet = home.getMBeansByType("