Boolean Expression for get date

Hi Experts,
I am working boolean expression in ssis package. I want download files from ftp and the file name is mic_20141101-mi.txt. 
I want to take yesterday files for that i am using expression but i want to give dynamic date which i want give in variable the specific date to download those files from FTP.
For this process i am using Boolean Expression if i give the specific date in variable then its download specific date files from ftp or else its download yesterday files.
Pls help to me for this scenario.
Raj.

You need to have a variable inside SSIS through which you pass the date value
Once passed you can have a script task inside your package to check for the pattern of date variable value inside your file to select correct files
see this for similar logic where i'm looking for files from current day
http://visakhm.blogspot.in/2012/05/package-to-implement-daily-processing.html
Please Mark This As Answer if it solved your issue
Please Mark This As Helpful if it helps to solve your issue
Visakh
My MSDN Page
My Personal Blog
My Facebook Page

Similar Messages

  • XPath expression for getting nodes based on date

    Hello,
    using javax.xml.xpath.XPath (Java 5) I want to get only nodes with dates (element pubDate) greater then some provided date. What is the expression for getting, say only first two <item> nodes? Is it at all possible?
    Example XML document:
    <?xml version="1.0" encoding="utf-8"?>
    <rss version="2.0">
         <channel>
              <title>Channel title</title>
              <link>http://www.foo.bar</link>
              <description>Channel description</description>
              <item>
                   <title>title 1</title>
                   <link>http://foo.bar.org/1</link>
                   <author>author 1</author>
                   <pubDate>Thu, 15 Jun 2006 13:14:00 GMT</pubDate>
              </item>
              <item>
                   <title>title 2</title>
                   <link>http://foo.bar.org/2</link>
                   <author>author 2</author>
                   <pubDate>Thu, 15 Jun 2006 13:11:00 GMT</pubDate>
              </item>
              <item>
                   <title>title 3</title>
                   <link>http://foo.bar.org/3</link>
                   <author>author 3</author>
                   <pubDate>Thu, 14 Jun 2006 13:03:00 GMT</pubDate>
              </item>
              <item>
                   <title>title 4</title>
                   <link>http://foo.bar.org/4</link>
                   <author>author 4</author>
                   <pubDate>Thu, 13 Jun 2006 12:59:00 GMT</pubDate>
              </item>
         </channel>
    </rss>Thanks for any hints!

    I would simply assign value to a variable inside package and use the value in the expression. You can also add variable to configuration if you want to pass a value from outside. You can also add another variable to determine whether you need yesterday or
    specific date and set expression accordingly so that you expression will look like
    (DT_WSTR,30)([User::DateCategory] == "Specific Date"? @[User::Date]:(DT_WSTR, 4) DATEPART( "yyyy", DATEADD( "dd" , -1, GETDATE() ) ) + Right("0"+(DT_WSTR, 2)DATEPART( "mm", DATEADD( "dd" , -1, GETDATE() ) ),2) + Right("0"+(DT_WSTR, 2)DATEPART( "dd", DATEADD( "dd" , -1, GETDATE() ) ) ,2)) +"_*.TXT"
    DateCategory variable should be of type string
    and Date should of type date
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Want to create RFC FM for Getting data in CRM from R/3

    Hi,
    I have made the RFC connection in CRM system , now I want to make RFC FM for getting data from R/3 'MARD' table into CRM, If any one help me how to do this.
    From CRM system I will pass Plant & material no to FM and I need Storage location & Storage Bin from R/3 MARD table in CRM.
    Thanks
    Bobby

    Dear Bobby,
    You would create a FM in SE37 select 'Remote Enabled Module' radio-button in attributes tab of Function Builder.
    Select matnr werks LGORT LGPBE
               from MARD
               into ET_MARD
               where matnr = i_matnr
               and  werks = i_werks.
    Note:
    matnr is material number
    werks is plant
    LGORT is storage location
    LGPBE is storage bin
    Hope this will help.
    Regards,
    Naveen.

  • Errors trying to apply a Boolean expression for conditional text

    I have been trying to create some Boolean expressions to filter conditional text, with mixed results. The Boolean expression is three conditions separated by ORs followed by four conditions preceded by AND NOTs. When I apply the expression, FrameMaker exhibits and error and has to quit. The numbers in the error message are:
    9004, 4908044, 6134440, 5459515
    The hidden log file appears to be nothing more than a stack dump.
    Do the numbers listed above indicate anything?
    Are there any known limitations on how long a Boolean expression can or should be? One expression with one fewer OR worked.
    Does there need to be a space between an AND and a NOT? The builder does add one, so I assume it is not necessary.
    Does anyone have some general rules of thumb when working with Boolean expressions for conditional text?
    Thanks,
    Van

    Van,
    The error values are meaningless to users. However, please do send the logfiles to the [email protected] address.
    As far as conditionals go, the general rules are that conditon names must be quoted and that if your ar using the NOT, it must run together with the AND or OR, e.g. ANDNOT ORNOT.
    There's an articel in the Developer Connection on using the boolean operators at http://www.adobe.com/devnet/framemaker/articles/fm8_single_sourcing.html
    Perhaps if you posted the condition that caused the crash, someone might be able to spot an error.

  • ALV FUNCTION MODLE FOR GETTING DATA IN EXCEL SHEET

    HI ,
    CAN I HAVE ALV FUNCTION MODLE FOR GETTING DATA IN EXCEL SHEET
    Regards,
    Aruna

    Standard ALV grid uses the FM <b>ALV_XXL_CALL</b> for exporting data into Excel. You can put a break-point in the FM and check it for urself.
    for ur info - the above FM takes the internal table name, internal table content and the field catalog as input.

  • BOOLEAN expression for fluctuating signal

    I want to create a BOOLEAN expression to return a TRUE for a signal that is increasing and FALSE for a signal that is decreasing. Any idea how this can be done?

    Assuming you use a while loop, you just check the iteration terminal. Presumably you can calculate how many points are in your 20 periods worth of data.
    You can also use a FOR loop and feed it an autoindexed array of 20 periods. Attached is a quick example (LAbVIEW 7.1).
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    ShowDirection.vi ‏36 KB

  • Expression for default data

    I'm trying to retrieve a file that is in the following format xxxxxxx_xxxxxx.YYYYMMDDHHMISS. I can't retrieve the file with the following sql command in the parameter "Expression for default for data" as
    to_char(sysdate,'YYYYMMDDHHMISS') because my command is looking for a file that is transferred at that exact time, down to the second.  I could pick up the file if it was named xxxxxxx_xxxxxx.YYYYMMDD and I used the command to_char(sysdate,'YYYYMMDD').  I can't use a wait event to pick up the file, because there is no scheduler associated with this server.  When I try to use the wildcard * it cancels with an error and returns the name xxxxxx_xxxxxxx.YYYYMMDD*.
    Do you know a command I could use in the "Expression for default for data" that would pick up the file in the following format: xxxxxxx_xxxxxxx.YYYYMMDDHHMISS.
    Thanks,
    Isaac Bonds

    Hi Isaac,
    Well, the wait event obviously is the easiest, then you have the exact file name available from the event, even hours later still. But this does require a scheduler to be installed on that server indeed.
    Given you do not use an event, how do you trigger this job now ? Do you use a polling mechanism ?
    And what about the other side that is creating the file: can they send you an event or trigger file containing the actual file name that needs to be processed ?
    Regards,
    Anton Goselink.

  • Create and save boolean expressions for later evaluation

    Is it possible to create Boolean expressions by inputs via user interface in LabVIEW and save them for later evaluation? I am interested in creating a 'flexible policy engine' which involves creating 'rules' comprising attribute values of certain attributes of objects based on boolean expressions which can later be used for arriving at some decisions based on the 'rules'.

    Hi Belur,
    Have you considered building a script based on the boolean expressions that you want to create for the flexible policy and saving the script to file?
    Later, you can read the script and depending on the policy, it can re-create the boolean expressions.
    A simple way to implement this is by having various pre-defined expressions places into a Case Statement. The script calls the appropriate cases that create the complete expression.
    You can store the attributes of the objects and when the vi is running, it can first open the initialization file, read the attributes and set them.
    For instance, you can read from and write to Property (and Invoke Nodes) to which you can the attributes.
    Unfortunately, I don't have an example of this that I c
    an share with you. There may be some if you do a search.
    Hope this helps..
    JLV

  • Formatted Text Field for getting Date

    I need a text field to get Date. does anyone know where I can find such a thing?
    all it needs to do is allow the user to type a date in dd/MM/yy format.
    10x.

    in a jtable it has a problem - when I press tab to exit the field the date is not changed.
    i set the on focus lost behaviour to commit, but still not working.
    also, it allows me to enter 4823749823/02/02 - and it translates it to the right format - I'm interested in something more fixed - allows to enter only 2 digits for day, 2 digits for month,2 digits for year.
    the relevent code I'm using is:
    // a cellEditor that uses a formatted text field that holds a Date object
    public class JFormattedDateCellEditor extends DefaultCellEditor {
    public JFormattedDateCellEditor(final JFormattedTextField textField) {
    super(textField);
    textField.setFocusLostBehavior(JFormattedTextField.COMMIT);
    textField.setHorizontalAlignment(SwingConstants.RIGHT);
    textField.setFont(JUtility.theFont);
    textField.setBorder(null);
    textField.addFocusListener(new FocusAdapter() {
    public void focusLost(FocusEvent e) {
    if (textField.getValue() == null) {
    textField.requestFocus();
    delegate = new EditorDelegate() {
    public void setValue(Object value) {
    textField.setValue((java.util.Date)value);
    public Object getCellEditorValue() {
    return textField.getValue();
    //to set the cell editor:
    column = collectionsTable.getColumnModel().getColumn(CollectionFrame_collectionsModel.DATE_COLUMN);
    column.setCellEditor(
    new JFormattedDateCellEditor(
    new JFormattedTextField(
    new DateFormatter(
    new SimpleDateFormat("dd/MM/yy")))));

  • Boolean expression for calculation problem

    Hi experts,
    I have following Keyfigures arranged in my Report:
    A  | B | AB | C | D | CD
    *A,B,C,D are key figures in column
    Now the user has demanded that they want to see only positive numbers in that Report and add all negative numbers in one column
    Desired:
    A (Only More than 0) | B (Only More than 0) | AB | C (Only More than 0) | D  (Only more than 0) | CD | ABC+D(where A,B,C,D are less than 0) * -1
    I know I have to do it using formula and boolean expression but dont know how.

    Create new Calculated KFs using Boolean operators  and hide original KFs.
    (A > 0) * A
    (B > 0) *B ....
    Similarly others 
    ((ABCD) <0)*(ABCD)  for -ve values
    Jaya

  • Boolean Expression for PS- Substitution

    Hi,
    I need a help with substitution:
    I need to copy location (PRPS-STORT)  at level-2  WBS element to level 3 &4 WBS elements using substitution. i.e, whatever value of STORT is there at level 2 should be copied to level 3 &4 without manual entry. What Boolean expression can make it possible?
    I am able to define 'Prerequisite' RCJ_PRPSUP-STUFE = '2' AND RCJ_PRPSUP-STORT = 01 and then for 'Sustitution' PRPS-STORT = '01'. This way I can achieve the purpose, if steps are created for each STUFE and STORT separately. But I  guess this is not the right / economical way of doing substitution.
    Any better methods, please ?!!!
    Murali

    Try this:
    Pre-req: Level (PRPS-STUFE) >= '3'
    Substitute: Location Field RCJ_PRPSUP-STORT
    Regards
    Sreenivas

  • Need a Better Regular Expression for Validating Dates

    I have data coming from file with date in the format DD-MON-YY.
    I have created the following regular expression:
    '^([0-2]{1}[0-9]{1}|[3]{1}[0-1]{1})-(JAN|FEB|MAR|A PR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC|Jan|Feb|Mar|Apr |May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-[[:digit:]]{2}$'
    However, it doesn't catch dates like 31-APR, 29-FEB. Can someone make changes to it to make it foolproof
    WITH temp AS
    (SELECT '29-FEB-07' AS COL1 FROM DUAL
    UNION ALL
    SELECT '31-APR-08' FROM DUAL
    UNION ALL
    SELECT '32-JAN-08' FROM DUAL
    UNION ALL
    SELECT '29-MAR-08' FROM DUAL
    UNION ALL
    SELECT '31-JAN-08' FROM DUAL)
    SELECT COL1,
    CASE WHEN REGEXP_LIKE(COL1,'^([0-2]{1}[0-9]{1}|[3]{1}[0-1]{1} )-(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC |Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)- [[ :digit:]]{2}$')
    THEN 'VALID'
    ELSE 'INVALID'
    END
    FROM TEMP;

    Hi,
    Please check this function.
    The function works for the dates in the format 'DD-MON-YYYY','DD/MON/YYYY'.
    create or replace function date_validation_f(v_date varchar2) return varchar2 is
    v_ip_date     date;
    v_ip_date_ch  varchar2(20);
    v_ip_year  number;
    v_ip_month char(3);
    v_ip_day   number;
    v_return   varchar2(10);
    v_leap_year_check number :=0 ;
    type v_month_name_typ      is varray (12) of char(3);
    type v_month_last_day_typ  is varray (12) of number(2);
    v_month_name     v_month_name_typ    :=v_month_name_typ('JAN','FEB','MAR','APR','MAY','JUN','JUL','AUG','SEP','OCT','NOV','DEC');
    v_month_last_day v_month_last_day_typ:=v_month_last_day_typ(31,28,31,30,31,30,31,31,30,31,30,31);
    begin
    --Assuming that input date is in the format DD-MON-YYYY or DD/MON/YYYY
    v_return := 'invalid';
    v_ip_date := to_date(v_date);
    v_ip_date_ch := to_char(v_ip_date,'DD-MON-YYYY');
    dbms_output.put_line('v_ip_date_ch := '||v_ip_date_ch);
    v_ip_month   := substr(v_ip_date_ch,4,3);
    dbms_output.put_line('v_ip_month := '||v_ip_month);
    v_ip_day    := substr(v_ip_date_ch,1,2);
    dbms_output.put_line('v_ip_year := '||v_ip_year);
    v_ip_year     := to_number(substr(v_ip_date_ch,8,4));
    dbms_output.put_line('v_ip_day := '||v_ip_day);
    -- Ckecking for leap year
    if MOD(v_ip_year,4)=0 then
      if MOD(v_ip_year,100)=0 then
        if MOD(v_ip_year,400)=0 then
           v_leap_year_check:=1;
        end if;
      else
           v_leap_year_check:=1;
      end if;
    end if;
    if v_leap_year_check = 1 then
       v_month_last_day(2):=29;
    end if;
    for i in 1..12
    loop
    if v_month_name(i)=upper(v_ip_month) then
         if v_ip_day between 1 and v_month_last_day(i) then
            v_return := 'valid';
            exit;
        else
            v_return := 'invalid';
            exit;
        end if;
    end if;
    end loop;
    dbms_output.put_line('v_return := '||v_return );
    return v_return;
    exception
    when others then
    return v_return;
    dbms_output.put_line(SQLERRM);
    end;you can use this function in SELECT statement.
    Edited by: Sreekanth Munagala on Nov 13, 2008 11:25 PM

  • Need regular expression for oracle date format 'DD-MON-YYYY'

    Hi,
    Can anybody tell me the regular expression to validate date in 'DD-MON-YYYY'.
    My concept is i have a table with just two columns item_name and item_date
    Both fields are varchar2 and i want to fetch those records from this table which have valid date format('DD-MON-YYYY').

    If it must be a regexp, this is a starter for you, note it carries the caveats mentioned by both posters above and in the linked thread
    mkr02@ORA11GMK> with data as (select '10-jan-2012' dt from dual
      2  union all select '10-111-2012' from dual
      3  union all select 'mm-jan-2012' from dual
      4  union all select '10-jan-12' from dual)
      5  select
      6  dt,
      7  case when regexp_like(dt,'[[:digit:]]{2}-[[:alpha:]]{3}-[[:digit:]]{4}','i') then 1 else 0 end chk
      8  from data
      9  /
    DT                 CHK
    10-jan-2012          1
    10-111-2012          0
    mm-jan-2012          0
    10-jan-12            0It will not validate content, only string format.
    And to emphasis the points made in the linked thread - dates in text columns is poor design. Always.

  • EJB-Archive for getting Data from the DB

    Hello,
    I want to get data from the Database. I created a EJB-Project with an Entity Bean and a Session Bean.
    The jar-Archive that I generated is corrupt. Is that normal?
    Can you provide me with information on database acces?
    In ABAP it would be a piece of cake: Select * from table into ...;-)
    Greetings, Frank

    Hi Frank,
    I see that you are interested in getting data from R/3, please correct me if I'm wrong.
    If that's so, you cannot do it by purely using EJBs, as an entity bean maps to a Table row in the database, which is not quite straight forward in terms of R/3.
    The only way to get data from R/3 is to use
    1)Java + SAP JCO
    2)or a Netweaver technology like Webdynpro + Adaptive RFC
    3)Portal Component + SAP JCO.
    Again, assuming you're dealing with a WebAS server, coming to EJBs, its no different to any other application server. So, you need an RDBMS to use Entity Beans.
    Please let me know if you've got more doubts.
    Regards,
    Rajit

  • Dynamic binding expression to get data from array

    I am retrieveing from an object to label my button as
    follows:
    quote:
    <mx:Button label = "{wordlist.word.LABEL[0][index]}"
    I now want the binding expression to be dynamic, meaning that
    LABEL has to be a variable. How would I do this?
    quote:
    <mx:Button label =
    "{wordlist.word.????[LABEL]????[0][index]}"

    "lunacafu" <[email protected]> wrote in
    message
    news:gqte13$1g4$[email protected]..
    >I am retrieveing from an object to label my button as
    follows:
    >
    >
    quote:
    <mx:Button label = "{wordlist.word.LABEL[0][index]}"
    >
    > I now want the binding expression to be dynamic, meaning
    that LABEL has to
    > be
    > a variable. How would I do this?
    >
    >
    quote:
    <mx:Button label =
    "{wordlist.word.????[LABEL]????[0][index]}"
    First, if wordlist.word.LABEL is an XMLListCollection or
    ArrayCollection,
    you need to use getItemAt instead of bracket notation. Once
    you get to that
    point, you need to cast it to whatever data type the object
    at 0 is.
    HTH;
    Amy

Maybe you are looking for

  • Why is clock running slow?

    Why is clock on phone losing about 3-4 minutes a day?

  • NFS nightmare

    I always had touble setting up NFS on my computer. i want to run the nfs server so that i can access the cd, but when i run /etc/rc.d/nfsd start i get nothing, no output, nothing, just [FAIL] i only want to share the nfs mount in my home network, not

  • Stars don't show up in Bridge

    Hi, I'm a new Bridge CS4 user. When I do edit my pictures on my Epson P5000 by putting stars on chosen pixs, I don't see those stars appearing on Bridge. Is there a trick to resolve that? Those stars appears in Expression Media (ex-Iview Mediapro)...

  • Can't Login (too many logins in a short period)

    Hi all, when I launch Ichat, it attempts to connect to the network many times in rapid succession and then I get a message saying that I've tried to login too many times and to wait a while and try to login later. Has anyone experienced this and is t

  • JAZN problems

    Does anyone know where to find a really good tutorial on using JAZN XML as the Security Provider for a JSP application?? I am having a hell of a time getting this to work. I have tried using the ADF Security Wizard in JDev 10g and it just isn't happe