Add timestamp using variable

Date stamp was easy to create using a custom format variable, but I cannot see how to do the same for a time stamp.  I would need a time stamp format without colons or slashes that would be rejected as a filename.  
Can a custom format Time variable be created?  Or has anyone created a job which adds timestamps to files?   I can script it of course, but looking for a clean all purpose time stamp process.
thanks        

For a file stamp the tidal system date is easy solution (you can use any date type variable)
Tidal Variables
Use system time (typically you add via variable button)
Take and remove :
and you will just get the numbers
use that as a tag to job
if you use Powershell you could use the get-date function as well depending ans format it depending on what you want to do.i
Marc

Similar Messages

  • How to use variables with

    I need to get the number of lines in internal table, which would
    be easy, using DESCRIBE TABLE itab LINES lines. But the problem
    is, that I get the name of this internal table in the field of
    another internal table, so I have to use the name of internal
    table as variable, but I don't know how to use variables with
    DESCRIBE TABLE (or if this is possible).

    Hi,
    REPORT ZPRUEBA782 .
    define two tables with diferent structures.
    data: begin of table1 occurs 0,
    registro type i,
    end of table1.
    data: begin of table2 occurs 0,
    registro type i,
    repid like sy-repid,
    end of table2.
    data: rows type i.
    start-of-selection.
    fill them with data
    do 1000 times.
    table1-registro = sy-tabix.
    append table1.
    enddo.
    do 1757 times.
    table2-registro = sy-tabix.
    table2-repid = sy-repid.
    append table2.
    enddo.
    call a form that receives as input the table and returns the number
    of rows as output.
    perform howmanyrows tables table2 changing rows.
    break-point. "evaluate the number of rows
    perform howmanyrows tables table1 changing rows.
    break-point. "evaluate the number of rows
    end-of-selection.
    form howmanyrows tables itable changing rows.
    rows = 0.
    loop at itable.
    add 1 to rows.
    endloop.
    endform.
    You can try it if you don't find a better solution.
    Cheers,
    Chaitanya.

  • Reciever File Adapter - Temp File Name Scheme using Variable Substitution

    How can I create a temporary file that uses variable substitution? 
    We are having a problem with files merging when we write files using the "Use Temporary File" setting on the FIle Adapter.  So two independent files are merging into a single file.  We are not using the "Append" setting.
    We would like to use a Temp File Name Scheme that would append the message id onto the temporary file name. 
    Using variable substitution we created a msgid variable.  When added to the temporary file name using %msgid% the temporary file name is created with %msgid% in the name instead of the actual message id.  We put the variable into the "File Name Scheme" as well and the end completed file used the message id in the name.
    Any Ideas?
    Thanks,
    Matt

    HI Matthew,
    Why are you adding the message id into the temporary file??
    I understand that you want the output of the filename to contain message id .. and hence you are using variable substitution for the same.
    Temporary file name will anyways get overwritten by the actual file name (here the actual filename will be using variable substituion).
    So i suggest to achieve your scenario you can add any name in the temporary file and maintain the desired filename you require as output in the variable subsititution.
    Temporary File Name option actually acts as a lock - unlock mechanism from PI side while the file is getting written to the file server so that while PI is writting the file no third party application batch program picks it up.
    I hope this helps.
    Cheers
    Dhwani

  • File to file with out message mapping and using variable substitution

    Hi,
    Can any one send me a scenario where we can have file to file scenario with out message mapping and where i can use variable substitution.
    As of now i am using integrate configurations where i cant use variable substitution as the message does not reflect in integration engine. I need to populate time stamp between <filename><timestamp>.txt.pgp
    I am as of now using configuration scenario.
    The time stamp always writes before the last file extension.
    Let me know your thoughts?
    Thanks,
    Chandra.

    Hi Chandra,
    u can use the Variable substitution even without IR contents also(Mapping....).
    in the receiver communication channel just specify the path u want to access for a value...
    eg: filename                             payload:mt_name,1,records,1,name,1
    and in th file name give it as %filename%.txt... or vt ever ur requirement
    Babu

  • SSIS - Using Variables in Execute SQL Task Error

    The following query in my Execute SQL Task throws the following error when run - [Execute SQL Task] Error: Executing the query "SELECT @columnz = COALESCE(@columnz + ',[' + times..." failed with the following error: 
    "Must declare the scalar variable "@columnz".". Possible failure reasons: Problems with the query, 
    "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
    Query:
    drop table tmpNCPCNCDownstreamMaxUtilization3wks
    select node, max(utilization) as max_Utilization, DATE
    into tmpNCPCNCDownstreamMaxUtilization3wks
    from stage_ncpcncdownstream_temporal
    WHERE Date BETWEEN DATEADD(day, -20, GETDATE()) AND GETDATE() 
    group by node, date
    order by node
    go
    alter table tmpNCPCNCDownstreamMaxUtilization3wks add Timestamp varchar(50)
    go
    update tmpNCPCNCDownstreamMaxUtilization3wks
    set Timestamp = 'WeekOf_' + cast(left(Date, 11) as varchar)
    go
    --drop table tmpNCPCNC_DownstreamNodeUtilizationMaxPivot
    --go
    declare @columnz varchar (8000)
    go
    SELECT @columnz = COALESCE(@columnz + ',[' + timestamp + ']','[' + timestamp+ ']')
    FROM tmpNCPCNCDownstreamMaxUtilization3wks group by timestamp order by timestamp
    go
    --pivot contents in @columns
    declare @query varchar(8000)
    SET @query ='select * into tmpNCPCNC_DownstreamNodeUtilizationMaxPivot from 
    (select node, timestamp, Max_Utilization from tmpNCPCNCDownstreamMaxUtilization3wks)a
    pivot
    sum(max_Utilization) for timestamp in('+ @columnz +')
    )as p'
    execute (@query)
    --empty contents from NCPCNCDownstreamMaxUtilization3wks
    update tmpNCPCNCDownstreamMaxUtilization3wks
    set timestamp =''
    truncate table tmpNCPCNC_MaxDownstreamNodeUtilzationChart3Week
    --load to table to be joined to Node feature class
    insert into tmpNCPCNC_MaxDownstreamNodeUtilzationChart3Week
    (Node, TwoWeeksAgo, PreviousWeek, CurrentWeek)
    select * from tmpNCPCNC_DownstreamNodeUtilizationMaxPivot
    --calculate average utilization for all values in each record
    update tmpNCPCNC_MaxDownstreamNodeUtilzationChart3Week
    set average = (coalesce(twoweeksago, 0) + coalesce(previousweek, 0) + coalesce(currentweek, 0))/3
    from tmpNCPCNC_MaxDownstreamNodeUtilzationChart3Week
    Scott

    Issue is with variable @columnz.
    Scope of variables is only limited to the batch and if batch is over Variable is no more accessible.
    Reproduce Steps: 
    DECLARE @columnz int = 0
    Go --Scope of @columnz ends here
    SELECT @columnz -- Ends up with error
    So you have to remove GO keyword. I have commented 2 of them in below:
    DROP TABLE tmpNCPCNCDownstreamMaxUtilization3wks
    SELECT node
    ,max(utilization) AS max_Utilization
    ,DATE
    INTO tmpNCPCNCDownstreamMaxUtilization3wks
    FROM stage_ncpcncdownstream_temporal
    WHERE DATE BETWEEN DATEADD(day, - 20, GETDATE())
    AND GETDATE()
    GROUP BY node
    ,DATE
    ORDER BY node
    GO
    ALTER TABLE tmpNCPCNCDownstreamMaxUtilization3wks ADD TIMESTAMP VARCHAR(50)
    GO
    UPDATE tmpNCPCNCDownstreamMaxUtilization3wks
    SET TIMESTAMP = 'WeekOf_' + cast(left(DATE, 11) AS VARCHAR)
    GO
    --drop table tmpNCPCNC_DownstreamNodeUtilizationMaxPivot
    --go
    DECLARE @columnz VARCHAR(8000)
    --GO
    SELECT @columnz = COALESCE(@columnz + ',[' + TIMESTAMP + ']', '[' + TIMESTAMP + ']')
    FROM tmpNCPCNCDownstreamMaxUtilization3wks
    GROUP BY TIMESTAMP
    ORDER BY TIMESTAMP
    --GO
    --pivot contents in @columns
    DECLARE @query VARCHAR(8000)
    SET @query = 'select * into tmpNCPCNC_DownstreamNodeUtilizationMaxPivot from
    (select node, timestamp, Max_Utilization from tmpNCPCNCDownstreamMaxUtilization3wks)a
    pivot
    sum(max_Utilization) for timestamp in(' + @columnz + ')
    )as p'
    EXECUTE (@query)
    --empty contents from NCPCNCDownstreamMaxUtilization3wks
    UPDATE tmpNCPCNCDownstreamMaxUtilization3wks
    SET TIMESTAMP = ''
    TRUNCATE TABLE tmpNCPCNC_MaxDownstreamNodeUtilzationChart3Week
    --load to table to be joined to Node feature class
    INSERT INTO tmpNCPCNC_MaxDownstreamNodeUtilzationChart3Week (
    Node
    ,TwoWeeksAgo
    ,PreviousWeek
    ,CurrentWeek
    SELECT *
    FROM tmpNCPCNC_DownstreamNodeUtilizationMaxPivot
    --calculate average utilization for all values in each record
    UPDATE tmpNCPCNC_MaxDownstreamNodeUtilzationChart3Week
    SET average = (coalesce(twoweeksago, 0) + coalesce(previousweek, 0) + coalesce(currentweek, 0)) / 3
    FROM tmpNCPCNC_MaxDownstreamNodeUtilzationChart3Week
    -Vaibhav Chaudhari

  • Changes to be made to the proprties file to add timestamp to a folder added

    Hi All,
    I want to add timestamp to a folder name.So I want to made some
    changes in the properties file .So should I add in the proprties file for
    fr_scheduler.properties file.
    Thanks

    crossrulz,
    i think that is exactly his issue. Using those deprecated functions:
    creates this image:
    Replacing the last multiplication only with the current version of "multiply":
    creates this image:
    I found out, that the current version of "multiply" obviously does work the same as "A x B.vi" from the matrix-palette:
    whereas the deprecated version handles the matrix as a simple array (multiplying index per index).
    So i would consider the old, deprecated version as bug when talking about matrix'es and the new behavior as fix for it. Obviously (overlay tells us so) this fix was implemented with 8.0.
    hope this helps,
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Move Excel file to Archive and add timestamp to file name

    I have SQL Server 2012 and using Excel Source and OLE DB Connection to import Excel data to DB.
    Currently file is located on C:\\Excel\filename.xlsx. I'm using File System Task to move file to C:\\Excel\Archive\filename.xlsx after Import Task.
    Now I would like to add timestamp to file name after moving file to archive. I would like to modify file name as C:\Excel\Archive\filename_timestamp.xlsx
    How to add timestamp to filename?
    Kenny_I

    Hi, 
    here you go with example
    http://consultingblogs.emc.com/jamiethomson/archive/2005/09/14/SSIS-Nugget_3A00_-Move-and-rename-a-file-in-one-operation.aspx
    thank you
    Aamir
    http://sqlage.blogspot.com/

  • Add 2 container variables in control step BPM

    Hi All,
    I have a scenario where I need to add 2 container variables in control step under AlertMessage and I am using under exception branch
    Control Step
    StepName: XXXX
    Action      : XXXX
    AlertCategory: XXXX
    AlertMessage: ?
    I am successful putting one container variable in alert message with &AAAA& but I want to add another variable values &BBBB& as well.
    When I tried to keep variables as &AAAA& and &BBBB&..I can return code 99 in sxi_cache.
    How can I achieve this with BPM..I am using sap pi 7.0

    may be i need to explain more clearly..
    I have 2 container variables with simple type which holds 2 different payload values.
    Under exception branch I have a control step to throw alert. In this I need to pass alert messages with these 2 varaibles.
    As I said earlier I am able to pass successfully one container variable value but when I insert the second variable it is not picking up and when I check sxi_cache the IP return was 99 which means some error occured while assiging these values.( I tried in different ways)
    But when I inserted has &AAAA& and &BBBB& then reuton code was 0 but whn I run scenario it is not populating both values
    Can anyone please help me how I can populate 2 variable values in alert message under control step.

  • How to remove ":"  in file name while using Variable substution

    Hi ALL
    I am using  file adapter and I what to create file name dynamically by acesssing PO number and time stamp from the payload using variable substution.
    But the problem is I am getting ":" in time stamp field value and it is not acceptable for file name .
    So could you please tell me a way that I can remove this ":" from that particular field value and create the file name dynamically.
    Note 1)Add Time stamp option will not help me as we require a time stamp of particular zone.
    2) Dynamic Configuration code is also not use full as I am using 1:n file creation

    >
    Prasanna Kumar wrote:
    > Hi ALL
    >
    > I am using  file adapter and I what to create file name dynamically by acesssing PO number and time stamp from the payload using variable substution.
    > But the problem is I am getting ":" in time stamp field value and it is not acceptable for file name .
    > So could you please tell me a way that I can remove this ":" from that particular field value and create the file name dynamically.
    >
    > Note 1)Add Time stamp option will not help me as we require a time stamp of particular zone.
    > 2) Dynamic Configuration code is also not use full as I am using 1:n file creation
    does the time stamp with the ":" a part of your output file?
    else use a replaceAll function in your mapping and replace the : with empty string then use the value in the variable substitution
    Another option is use the normal BPM for 1: N message flow. The use a simple java mapping that will introduce a dynamic configuration and you can create the file name as you want. the java mapping will be used in the flow of messages from BPM to target system.
    ref: /people/shabarish.vijayakumar/blog/2009/03/26/dynamic-configuration-vs-variable-substitution--the-ultimate-battle-for-the-file-name

  • Repost Function using Variable is not working

    Hello experts!  I am on BW-BPS 3.5.  I have set up a repost function using variables to change a characteristic value for Business Unit.
    1. I created 2 variables as Bus.Unit From and Bus.Unit To in the Planning Area. I am not using the variables in my planning level.
    2. I entered the variables in the parameter group New Values area for the From and To Values.
    3. My goal is when the user executes the Repost Function for a Variable Prompt should appear and have the user select the From Business Unit and To Business Unit.
    The Variables are set up as USERVALUE User-Defined Values, Restriction of Values required by user and I have tried with/without option of Input Allowed by User. 
    Can you tell me what I am doing wrong, I expected a variable prompt when executing the Repost Function but it does not work.
    Thank you,
    Teri

    Ravi, Thank you for your reply however I contiue to have errors or the execution does not repost (change any value) as noted below.
    1. I have 2 Variables in Planning area var1 (from) var2 (to) for the same charateristic which is Business Unit
    2. Business Unit is in the level,  on the selection tab to add the variable I can only add 1 variable, So I added var1 (from) to the level. 
    3. Parameter group for old and new values - I have Var1 (from), var2 (to)
    4. Report Function - are you referring to Reporting variables in BPS? I have set this up as suggested in the "How to Use Reporting Variable in BW-BPS" document.
    5. Enter plan data: I receive prompt for VAR1, mandatory. At this point there is no value in Var2.
    6. Execute Repost function - I receive an error to "Restrict Var2"
    7. If I set variable values and add a value for Var2 I receive an error "The generated data is not contained in the selection condition".
    Next I removed VAR1 from my planning level and turned on the option 'Selection in package' for Business Unit. This seems to work well.
    What do you recommend?
    Thank you,
    Teri

  • How to use variables in scriptlogic

    Hi BPC gurus,
    I'd like to make a condition in my scriptlogic for an allocation of a planned value on year base to the months values. If there is reference data in the past year, I would like to allocate according to the reference. If not, I would just like to make an even distribution. Unfortunately I didn't find a way to use variables in scriptlogic and assign values to them. Here's my coding:
    *LOOKUP Vertrieb
    *DIM MEASURES="PERIODIC"
    *DIM CATEGORY="ACTUAL"
    *DIM P_DATASRC="UPLOAD"
    *DIM PREVYEAR:TIME="2009.TOTAL"
    *DIM PREVJAN:TIME="2009.JAN"
    *DIM PREVFEB:TIME="2009.FEB"
    *ENDLOOKUP
    *WHEN TIME
    *IS "2010_INPUT"
    *WHEN CATEGORY
    *IS "PLAN"
    *WHEN P_DATASRC
    *IS "MANUAL"
    //here I would like to add a condition if the value for the past year is not 0
    *REC(FACTOR=LOOKUP(PREVJAN)/LOOKUP(PREVYEAR),TIME="2010.JAN")
    *REC(FACTOR=LOOKUP(PREVFEB)/LOOKUP(PREVYEAR),TIME="2010.FEB")
    //or here I would like to add a condition if the value for the past year = 0
    *REC(FACTOR=1/12,TIME="2010.JAN")
    *REC(FACTOR=1/12,TIME="2010.FEB")
    *ENDWHEN
    Thanks for your assistance.
    Regards,
    Ulrike

    Hi,
    If you would like to add a condition if the value for the past year is not 0, then you can try
    *WHEN TIME
    *IS 2009.TOTAL
       *WHEN SIGNEDDATA
       *IS (put is not equal to sign, as I am not able to put it) 0
          *REC(......)
       *ENDWHEN
    *ENDWHEN
    *COMMIT
    Hope this helps.

  • Using variables in shape's coordinates - urgent

    Hi,
    how can i draw using a variable to set the shapes coordinates ?
    i need to increment this variable to continue drawing in the panel
    at the last position.
    LIKE THIS:
    g.fillRect(490,210,300,100); ==> it works
    g.fillRect(x+100,y+100,150,150); ==> it doesn't
    x=x+100;
    y=y+100;
    when i scroll the panel and back to see the shape, it disappears.
    This happens because I am using variables in the coordinates of the shapes. Then, when the variable is incremented, the shapes lose its initial position.
    how can i do it ??? PLEASE HELP ME.
    THANKS.
    here is the code to execute. its very simple.
    import java.awt.*;
    import java.awt.event.*;
    public class SamS extends Frame
    public SamS()
    addWindowListener(new WindowAdapter()
    public void windowClosing(WindowEvent ev)
    dispose();
    System.exit(0);
    ScrollPane sp = new ScrollPane();
    Board pan = new Board();
    sp.add(pan);
    add(sp);
    setSize(700,500);
    setVisible(true);
    public class Board extends Panel
    int x=20;
    int y=20;
    public Board()
    super();
    setLayout(null);
    setSize(2400,2400);
    setBackground(Color.white);
    public void paint(Graphics g)
    g.setColor(Color.black);
    g.fillRect(10,10,100,100);
    g.setColor(Color.red);
    g.fillRect(410,410,100,200);
    g.setColor(Color.orange);
    g.fillRect(490,210,300,100);
    g.setColor(Color.blue);
    g.fillRect(x+100,y+100,150,150);
    x=x+100;
    y=y+100;
    public void update(Graphics g)
    paint(g);
    public static void main(String args[])
    new SamS();

    Your incremented values (x and y) are out of the visible area as the repaint method will be called many times while scrolling. Increment your x and y to lesser value (say 1 or 2).

  • Using Variables in a "Report Custom Functions"

    Hi!
    I created a custom function using Basic Syntax where I am trying to declare/use variables.  I keep getting syntax errors and don't know why.  Here is my code so far:
    Function cdQSIPeriod () As String
    YY = Year(CurrentDate)
    MM = Month(CurrentDate)
    If MM = 1 then
        MM = 12
        YY = YY - 1
    else
        MM = MM - 1
    cdQSIPeriod = String(MM)& String(YY)
    End Function
    Any help you can provide will be appreciated.

    You need to add
    dim YY as number
    dim MM as number
    HTH,
    Carl

  • Using variables within GETurl

    Having issues with getting a simple script working...
    I've created a 'flashvars' tag in my embed code (aid=test), which I simply wish to add to the end a GetUrl statement, contained in within a button (which is on the first level of the flash movie). This is the code I've added to the button...
    on (release) {
        getURL("http://www.platinumselect.com?id="+aid);
    But this doesnt seem to work!? Is there anything else I need to do?
    Thanks in advance! (p.s. using actionscript 2.0)

    Where are the 3 places?? I've got it in two at the minute.
    Date: Tue, 10 Nov 2009 07:53:55 -0700
    From: [email protected]
    To: [email protected]
    Subject: Using variables within GETurl
    in as2, there is no LoaderInfo class and you don't need to do anything in flash to parse the flashvars.
    but, as i mentioned in a duplicate post, you do need to define your flashvars in 3 places in your embedding html file.  failure to do that is the most common reason for a problem with flashvars.
    >

  • Using variables for answers to fill-in-the-blank questions

    Hello,
    For fill-in-the-blank questions, one has to provide answers. I want to provide these in the form of (user-created) variables, rather than in the form of fixed strings of characters (so then, as $$var1$$ rather than as 'rabbit'). I haven't been able to get this to work. The enter variable function is indeed available (in the properties panel), but it doesn't actually work (i.e. even if you select a variable to be entered, it doesn't actually get entered).
    Is there a way around the problem?
    1. NB that this same issue holds for text entry boxes (rather than fill-in-the-blank questions). If I could get this to work for text entry boxes, I would use them rather than fill-in-the-blank questions.
    2. One can use variables for answers to multiple choice questions. So I'm hoping I can get it to work for fill-in-the-blank questions as well.
    Thank you in advance. Marvin DuBois

    That would have been my suggestion. I don't have a dedicated blog post, but use TEB's for that kind of questions myself as well. And contrary to the widget/interaction I mentioned before, a TEB is an interactive object, which means it can be validated and there can be a score attached to it. But, it will not help you, since you have to add the correct answers in the same way as for a dropdown list in the FIB question (they are sort of TEB's there). And it is that list that doesn't allow to enter a variable instead of a fixed sequence of characters.
    Which means that you are back to the advanced actions, same as in my blog posts with the widget/interaction.
    Have a workaround (after all I am the workaround Queen) to have reporting, if you need to check only one TEB, described here:
    http://blog.lilybiri.com/report-custom-questions-part-2
    The idea is to use another interactive object that can have a score. In reality I use two instances of that same object: one with score 0 and one with score X and show the right one depending on the conditional action.
    However if you want to have multiple TEB's on the same slide, that have to be checked all with the same advanced action, than you'll need either the Mastery widget by InfoSemantics (only for SWF output) or Javascript.
    Lilybiri

Maybe you are looking for

  • Customize printed purchase order report

    Hi all i need to customize Printed purchase order report i need to add supplier item number to printed purchase order report where(group) i need to add item number i think it g_lines right? item number is sengment from tml_system_items_b is it correc

  • Format links are greyed out

    I have set up links with success but when I try to format them I am having a problem. I select the link and on link inspector choose format. The options are greyed out. Help suggested opening the colour palate but no good. I am using blank pages with

  • External drive shows yellow

    I just attached a new external drive to my iMac.  I set it up to replace a drive I was using for backup.  I cleared off the old drive and want to use it to store/backup my photos.  It shows up as a yellow icon on my desktop and the other is green wit

  • Portal Search Not Working - Only Returns Portal Content, Not TREX Indexes

    I have configured two indexes using the portal.  One is for documents that reside on the portal, and the other one is for a website that we have configured in TREX using Cruiser.  The TREX Admin console shows that the website information has been ind

  • How RequestDespatcher.include() method gets higher priority  ?

    Hi, I have three jsp pages named as A.jsp ,B.jsp and C.jsp respectively. In A.jsp , i include B.jsp using include directive and i include C.jsp using RequestDispatcher.include(). But in output of A.jsp , The output of C.jsp comes as first and then ou