Script task how to add date value

hi
i have following code i am trying to add date into script task
 Public Overrides Sub CreateNewOutputRows()
        Dim vars As IDTSVariables100
        Dim vars1 As IDTSVariable100
        Dim recordCount As Integer
        Dim rdate As Date
        ' Dim recount As Integer
        '  Dim rcount As Integer = 0
        'Get the record count
        Me.VariableDispenser.LockOneForRead("RecordCount", vars)
        recordCount = CType(vars("RecordCount").Value, Integer)
        ' rdate = CType(vars("CurentDate").Value, Date)
        vars.Unlock()
        Me.VariableDispenser.LockOneForRead("CurrentDate", vars)
        rdate = CType(vars("CurrrentDate").Value, Date)
        ' rdate = CType(vars("CurentDate").Value, Date)
        vars.Unlock()
        'Me.VariableDispenser.LockOneForRead("rcount", vars)
        'rcount = CType(vars("rcount").Value, Integer)
        'vars.Unlock()
        '  rcount = rcount + 1
        'Output one row with record count
        Output0Buffer.AddRow()
        Output0Buffer.FooterRow = String.Format("ABC" & recordCount & rdate)
        Output0Buffer.SetEndOfRowset()
in SSIS i have declare CurrentDate in datetime and i need to use it here , but i am getting error.
how to append its value to       Output0Buffer.FooterRow = String.Format("ABC" & recordCount & rdate)
its in vb ,i dotn know anything about VB ,please help me.
i havent put anything in  readonly,readwrite in script task.ecordCount is working but i did same  for rdate and its not working

how to get that value in yyyymmddhhmmss format in ssis.
whats expression i need to use.
also how to give single  space here between recordcount and variables.rdate
Output0Buffer.FooterRow = String.Format("ABC" & recordCount & Variables.rdate)

Similar Messages

  • How to add integer value of two buttons?

    how to add integer value of two buttons (any button) in VI and display it in output text box? i have attached example program, but i know its wrong.. please help
    Solved!
    Go to Solution.
    Attachments:
    add.vi ‏8 KB

    thanks for reply. i am trying to assign an integer value to a button and the button should send the assigned integer value to TCP/IP write, only when the button is pressed. i am able to send data using string control (as shown in the attachment) but i want to replace it with several buttons. for example, if i enter 2 in string control, this data will be sent to a robot (robot has wifi card)  through tcp/ip protocol, it moves front. 3 will make it to move back, 8 is left, 6 is right. this numeric data is already burnt into blackfin processor of the robot. so just by entering numbers in labview can make my robot move in specified direction. can you please help me to create a button with value and convert it into string and send it to tcp/ip write. this should happen only when the button is pressed. because, if i enter numbers in string control, it dosent looks good..... if i have buttons... i think my VI will look good and hitech.
    Attachments:
    robo.vi ‏9 KB

  • How to add two values

    How to add varchar values in oracle.Consider as both are time values.but the data type[both] is varchar and stroed in table
    For example:
    Column1 Column2
    2.40:10 PM 5:22:00
    i need the result for the following format
    8.02[8 hours and 2 minutes]

    with c as
    (select '2:40:10 PM' t1, '5:22:00 PM'  t2  from dual)
    select hr+level ||':'||to_char(mi - (level*60))||':'||sc Time from
        select  sum(h) hr,sum(m) mi, sum(s) sc from
            (select
                    substr(t1,1,instr(t1,':',1)-1) h, substr(t1,instr(t1,':',1)+1,instr(t1,':',2)) m, substr(t1,instr(t1,':',3)+1,instr(t1,':',3) - instr(t1,':',2)) s, substr(t1,-2) t
            from c
            union
            select
                    substr(t2,1,instr(t2,':',1)-1), substr(t2,instr(t2,':',1)+1,instr(t2,':',2)), substr(t2,instr(t2,':',3)+1,instr(t2,':',3) - instr(t2,':',2)), substr(t2,-2)
            from c
    connect by level<(mi-60)
    TIME
    8:2:10

  • In Scom,How to add CAC value in given MP (management pack)? Please give me in detail procedure with example if possible.

    In Scom,How to add CAC value in given MP (management pack)? Please give me in detail procedure with example if possible.

    Hi 
    CAC is System.ConsolidatorCondition condition detection module used to consolidate the monitoring i.e. you can generate an alert on multiple occurrence of issues instituted of generating single alert for issue.
    refer below link for more information
    http://msdn.microsoft.com/en-us/library/ee809324.aspx
    http://social.technet.microsoft.com/wiki/contents/articles/20301.how-to-add-consolidation-for-url-monitoring-in-scom-20072012.aspx
    Regards
    sridhar v

  • How to add field value to the standard table

    Hi,
    How to add field value to the standard table?
    for example:
    when we go to TCODE SE16-> VBAK table -> on the selection screen if we press F4 against VBTYP we get all the available values for that field. How to add a new document Category value to this field so that it shows up in F4 help for that field.

    Hi Asif,
    I don't think it is possible and feasible for adding new field value to the field VBTYP because it is not possible through SPRO.
    If u see the domain of this field VBTYP we have fixed values provided by SAP. There is no value table for this. If u have value table then it will be updated through SPRO. But still if u really want to add some value u can do that by getting access key and add the value in the fixed values of the domain. But of no use other than simply displaying in F4. Because for what ever value u created here there will be no documents in VBAK or any table using this domain.
    Hope this is clear for u.
    Thanks,
    Vinod.

  • Model of how APEX handles data (values)?

    Reference {thread:id=2486655}
    I'm trying to get a model of how APEX handles data (values). There are several places(?) that data (values) can exist. Or so it seems. I'm trying to understand how these work -- to put all the pieces together.
    Question:
    A) Where data can be?
    1) In the database
    2) In the session
    3) Rendered -- and hence displayed on the screen, if a displayed value -- but not in the session
    4) In perhaps(?) some working memory pool(?) but different from the page rendered values I see on the screen?
    5) Other?
    Why do I think this is relevant?
    Question:
    B) If there are rendered values and session values different from the rendered values, then when code executes, which of these values (rendered or session) is it executing against?
    And maybe the answer is, "You don't understand what's going on." Yes, "Exactly!" Hence the question.
    Best wishes,
    Howard

    Howard (DBA in Training) wrote:
    I'm putting this together now. For example:
    I set the value of a Page Item (say, :P2_DATA) to "BEFORE" in a Before Region process and change it to "AFTER" in an After Region Process. 'BEFORE' was displayed on the screen but 'AFTER' was in the session state. So I see that PL/SQL changes these values in the session state. But it doesn't "go back" to change the HTML after the region has been rendered -- hence we see BEFORE shown on the screen. (I'll have to think about what a Dynamic Action does.)
    Also, if a page item has a default value, say 'DEFAULT' then that value doesn't get into the session state. At least, not with my current settings. Oh, that explains a lot of confusion!! I suppose there's a logical reason for this but who would expect default values to be differently from other PL/SQL operations on the item?
    Questions:
    1) So why does a default value not get put into the session state?Several reasons, among them:
    *1. When/why is the value required?* Region items (and thus their source and default values) are rendered in region/item sequence order. The item's source/default value would therefore not be available in session state until it's rendering point. This is frequently later in page show processing than the value is actually required, such as the common use case of including a data value in the page or region title. Setting the value in a Before Header/Regions computation or process makes it available as required before the item is actually rendered.
    *2. The rendered page might not be submitted.* Default values are typically set when a page will create a new row. Consider the situation where the user clicks a "Create" button and is presented with an order entry form containing several default values. They then decide they don't want to create a new order after all, and navigate away from the form page via some mechanism that uses a redirect rather than a submit (such as a default "Cancel" button). This means that no page submit processing is performed, and generally that no session state management is performed. If the default values were set in session state, the order entry page would contain the default values for the non-existent order despite the user never submitting it. This may have unwanted side-effects if these values are referenced elsewhere in the application, and therefore would require extra session state management to be built into the application.
    *3. A rendered item might not be submitted with the page.* Per the HTML specification, the values of disabled controls unchecked checkboxes are not POSTed on page submit. Consider a situation where a checkbox item is set with several default values, but the application requires that the checkboxes be cleared and disabled by a dynamic action if the user chooses certain options from a select list. In this case, on page submission no values are submitted into session state for the checkbox item. If the defaults had been set in session state, then the application would be in an inconsistent state, with the user-selected option indicating that none of the checkboxes were checked, but with session state holding values showing that they were. This would require additional processing to ensure that the application's state was consistent before saving it to the database.<sup>1</sup>
    2 & 3 are particularly significant in basic wizard-generated applications. Doing things in this way, the wizard-generated DML and navigation "just works", without the need for additional session state management.
    2) Is there a Page Item setting that causes the default value to be saved to the session state?No. Hopefully the explanations above provide sufficient reason to show why this is genearlly not desirable. On the rare occasions when it is required, set the session state value using a computation or process.
    <sup>1</sup> There are other reasons&mdash;mainly security related&mdash;that make it good practice to perform such checks in more complex and internet-facing applications anyway.

  • How to add date with month after convert number to month?

    How to add date with month after convert number to month?
    Month Date Result
    24 21/11/09 24*(21/11/09)
    I want to add both the column and result should be 21/11/11
    Thanks
    Nihar

    Hmm,
    Because, you are using YYYY for '09'.
    SQL> ed
    Wrote file afiedt.buf
      1* select to_char(to_date('10/01/09','DD/MM/RRRR'),'DD/MM/YYYY') from dual
    SQL> /
    TO_CHAR(TO
    10/01/2009
    SQL> ed
    Wrote file afiedt.buf
      1* select to_char(to_date('10/01/09','DD/MM/YYYY'),'DD/MM/YYYY') from dual
    SQL> /
    TO_CHAR(TO
    10/01/0009Or with Add_months
    SQL> ed
    Wrote file afiedt.buf
      1* select to_char(add_months(to_date('10/01/09','DD/MM/YYYY'),36),'DD/MM/YYYY') from dual
    SQL> /
    TO_CHAR(AD
    10/01/0012
    SQL> ed
    Wrote file afiedt.buf
      1* select to_char(add_months(to_date('10/01/09','DD/MM/RRRR'),36),'DD/MM/YYYY') from dual
    SQL> /
    TO_CHAR(AD
    10/01/2012-Arun

  • How to add date in XSLT?

    All,
    soa version: 11.1.1.4
    There is a requirement for me to add date to the current date in XSLT.  I searched in 'Data functions', there I couldn't find any pre-defined functions.  How do I achieve it in XSLT?  Any help is appreciated.
    thanks
    sen

    Hi Sen,
    You can do this using the below:
    <xsl:value-of select="xp20:add-dayTimeDuration-to-dateTime(xp20:current-dateTime(),'P1D')"/>
    You can change the P1D based on the number of days you want to add.
    For example 3 days = P3D
    Thanks,
    Deepak.

  • How to add HEX values in a Report.

    I have a special requirement. I need to add hex values in a report. To be specific, the special HEX characters: 0D 0A 0C 0C, has to be added to TOP of PAGE event.
    Drawing What I want will be something like that:
    CR/LF FF/FFABCDEFHGIJKLMNOZVCXC 
    This is a Report that has to be send to the spool. Once in the spool will be converted to TXT file. I created a small code using print control function but still It is doesn’t working.
    I defined a print control ZPAGE as ‘0D 0A 0C 0C’.
    Any idea how to do this?.
    ** This report doesn’t include the Top-of Page event.
    ** Example Report.
    REPORT  ZCAPRTHEX2 NO STANDARD PAGE HEADING.
    Data: String1(120) type c value 'ABCDEFHGIJKLMNOZVCXC'.
    WRITE : /.
    PRINT-CONTROL FUNCTION 'ZPAGE'.
    WRITE : string1.
    This is what I see in SP01 as HEX View
    ABCDEFHGIJKLMNO ZVCXC #ZPAGE

    If you download spool to file like that, you are still getting the spool in SAP format, it's not going to have the hex chars. You need to print the file by clicking on printer button. SAP generates file in printer readable format and send it to printer. I'm refering to that file.
    Ask your basis folks to write the spool output reqest file to a file instead of sending to the printer. Open that file in hex viewer.
    Regards
    Sridhar

  • How to add data in xml file

    Hi ALL
    I want to add new fields on seeded EBS page to store their values in hr_api_transaction table whoch contain information of other fields on that page which are seeded
    but that table has one column which stores xml file and that xml file has all information about that page's fields
    how can I store my custom fields values in that xml file ?

    Hi,
    As Andy said,  add data to an xml file is overwriting, if you mean append data to xml file, please look this article:
    http://codesamplez.com/programming/linq-to-xml-tutorial, Since this issue is more related to ASP.net, you could also ask this issue in asp.net forum:
    http://forums.asp.net/
    Best Regards,
    Jambor
    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.

  • In script J_1I_EXC_INVOICE how to add  J_1IEXCDTL-EXBAS

    Hai All,
    please its very urgent for me.
    i m facing problem in J_1I_EXC_INVOICE  script i want to add the excise base valueJ_1IEXCDTL-EXBAS.so please tell me how can i total the exbas value.
    Priti Shrivastava

    Hi!
    You can count value only in your sapscript's printer program.
    You have to debug the printer program, and add your modifications in the programs main loop.
    For example:
    CLEAR lv_sum_exbas.
    LOOP AT J_1IEXCDTL-EXBAS
      ADD J_1IEXCDTL-EXBAS TO  gv_sum_exbas.
    ENDLOOP.
    CALL FUNCTION 'WRITE_FORM'
      EXPORTING element = gv_sum_exbas_print.
    In your sapscript
    /E gv_sum_exbas_print
    AA gv_sum_exbas
    Regards
    Tamá

  • How to add data

    hi everyone ! i have created a view object based on 2 entities objects (EMP and Departaments of hr schema)
    but i have also modified the sql query of the view in this way :
    SELECT Employees.EMPLOYEE_ID,
    Employees.FIRST_NAME,
    Employees.LAST_NAME,
    Employees.DEPARTMENT_ID,
    Departments.DEPARTMENT_NAME,
    Departments.DEPARTMENT_ID AS DEPARTMENT_ID1
    FROM EMPLOYEES Employees ,DEPARTMENTS Departments
    where Employees.DEPARTMENT_ID(+) = Departments.DEPARTMENT_ID
    and i have created a tables based on this view object..... in this table are shown those empl. that doesnt have departaments.... what i want to do is how can i add data to those rows wich doesnt have employess but have departaments???
    Thanks in advance :)

    Hi,
    I think you can resolve that problem using EL expression condition, try the following in your table:
    <af:table ...>
    <af:column headerText="#{bindings.EmployeeDepartment.labels.FirstName}"
    binding="#{backing_EmployeeDepartment.column2}" id="column2">
    <af:outputText value="#{row.FirstName!=null? row.FirstName: 'No Emp Found'}"
    binding="#{backing_EmpDept.outputText2}"
    id="outputText2"/>
    </af:column>
    </af:table>
    Regards,
    Ahmad Esbita

  • How to add selected values from table(selected using checkbox)to table?

    Hi All,
    i have created simple page with search panel with table in table i have created one column as check box for selecting.
    here what my requirement is i need to do search multiple times to add some roles to from some different categories.here whenever i searched i ll get some roles into table there i ll select some role and i ll click add buttion. whenever i click add i need to add those roles into some other table finally i ll submit added roles.
    here i followed one link http://www.oracle.com/technetwork/developer-tools/adf/learnmore/99-checkbox-for-delete-in-table-1539659.pdf
    i used same code and able to see selected row in console, as object array how to add these into table.
    please help me out
    Thanks in advance
    siva shankar

    Thank you for a quick reply
    i used the same thing before i go for table check box concept.here what i observed is when i search i am getting some results i am able to shuttle.but if i search again the shuttle is refreshing with new values even not available list its refreshing selected list. IF dont want refresh selected ones.
    my usecase after make some searches I will select some roles from different categories at finally i ll submit.
    i hope you understand me requirement. please suggest me is this requirement is possible in shuttle component? if yes please guide me.
    thanks
    Siva Sankar

  • How to pass date value to an UDF

    Hi,
    I am working in SDK UI. I have created a form. In this form there is a edit text box. I have to pass a date value to that object. I have taken a variable and pass a date value in "yyyy/mm/dd" format. When I am assign this variable to the object to pass the date value to that object then I am getting an error. The error is "Unable to cast object of type 'system.string' to 'system.IFormatProvider' ".
    I have written the code like this :------>
    Dim AtenDate As String   
    AtenDate = '2007/08/01'    ' format "yyyy/mm/dd"
    Dim txtEditDt As SAPbouiCOM.EditText
    oItem = oForm.Items.Item("11")
    txtEditDt = oItem.Specific
    txtEditDt.String = AtenDate.ToString("dd/MM/yyyy")
    After the last line the error is getting fire.
    Please help me how I can pass the date value to that object.
    Please help me. It is very urgent.

    Date and Double conversion is really a confusing thing in B1-SDK programming in the beginning.
    But once you got it it's okay.
    When working with date-time and doubles (System and SBO-Price/SBO-Quantity),  you should always take care about the language of...
    ...system (windows)
    ...SBO User Interface
    These two formats could make trouble when the programming has been made only for a specific configuration of these two.
    The third format for SDK-Programming is
    ...the SBO-DB-Format, which is language-independent and always a String
    Here are some rules:
    <b>EditText.String</b> ALWAYS returns the value you see on the SBO GUI. It depends on the SBO Date, Price etc.-Format the USER has configured in the Administration. Consider that the user has (for example) the possibility to choose a "#" (or whatever) as decimal-seperator. Direct (implicit) conversion of such a string to a double will fail at the latest now.
    The savest way to get a .NET-Double or DateTime- Value from EditText.String are the conversion methods of  SBOBobs-Object (see SDK-help -> BoBridge, Format_MoneyToString...etc.).
    I think it's a good idea to write some wrapper functions for that methods, cause they always need a recordset which blows up the code too much.
    <b>EditText.Value</b> always (system/sbo-language independent) returns the value as a String in DB-Format (Double as "12345.126700" and date as "20070930".
    For that you must asure that the EditText is bounded to a format-corresponding datasource. Price, Quantitiy.... if you need a double.
    If your "price"-field would be bound to ShortText and the user wants (assuming the example from above) a "#" for decimal-point, then a GUI-seen value like "12,421#12" is also returned as "12,421#12" by EditText.Value. But If bound to Price-DataSource it's "12421.120000"
    => So always do a DataBind to the Data - Type which is needed is recommended for this to work!
    In my case EditText.String and -Value is mostly (only...? needed for B1-System-Forms where using of DataSources is restricted.
    The prefered way of read/write values is the
    <b>UserDataSource.ValueEx and DBDataSource.GetValue/SetValue</b>-method. It's also always in DB-Format as EditText.Value before, but gives much more performance.
    Once you got some conversion-functions for "DB-Format-String" to ".NET-DataType" and vice verca (I've defined some .NET - System.Globalization.XXXFormatInfo-Objects for that) all of your problems are things of the past
    Regards,
    Roland
    null
    Message was edited by:
            Roland Toschek
    Edited by: Roland Toschek on Jan 22, 2008 5:32 PM
    Trying to clarify a sentence

  • How to add data in a file

    hi,
    I have written following code.I have a file. i want to add data in this file.
    When i add data then data is added but i donnot get the previous data. What`s the problem of my code? Is there anyone can help me? how i will add data with the previous data? Please help me.
    String username=request.getParameter("UserName");
    String userage=request.getParameter("UserAge");
    String address=request.getParameter("UserAddress");
    String sex=request.getParameter("sex");
    FileWriter f = new FileWriter("d:\\download_dreamweaver\\Project_3\\WebContent\\SaveData.txt");
    f.append(username);
    f.close(); ith regards
    bina

    Looks like you're creating a new file (which overwrites the old one) every time. You need to open the file first and then append to it.

Maybe you are looking for

  • I cannot connect to the net through my TC with pppoe

    I used to connect to the internet using my TC as a router, connecting via PPPoE using a DSL modem. While my ISP had a problem with their network, the TC stop connecting to the PPPoE host and the amber light kept blinking. Because this was taking too

  • Application Loader error, how to submit app for approval

    Firstly, here's my info: 1) App is for iPad and iPhone/iPod Touch 2) Build using Flash CS 5 (Windows), packaged using Air 2.6 using ADT. 3) Successfully build and tested my .ipa file. 4) I just got a Mac OSX (I'm new to Mac) for submitting to Apple f

  • Table does not exists.

    I M TRYING TO TAKE EXPORT OF A TABLE BUT I M GETTING ERROR THAT TABLE DOES NOT EXISTS BUT ACTUALLY TABLE EXISTS... PLEASE SUGGEST Y I M GETTING THIS ERROR. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production Wit

  • How can I ¨mark with don´t assisted¨ videos in Ipod Touch

    How can I ¨mark with dont assisted¨ videos in Ipod Touch

  • Folio Upgrade: Error #3115table 'folioFolderCache' already exists

    I just upgraded the Folio Builder with a recent version for Indesign CS5. It worked ok on initial install for a few hours until I closed Indesign. And when I re-opened Indesign I started getting this error message: An error has occured while saving y