Crystal Formula to convert WEEK # to the corresponding Date

I am trying to see if it is possible to take a week number and then show the corresponding date for the beginning date?
I have the week number for a transaction, but now I need to show the week beginning (Sunday) and ending date. Is this possible in Crystal?

Hi
Try something like this
datevar yearstart := date(year(currentdate),1,1);   // Set the start date to the first of the year
numbervar weeknumber := 20;     // This would probably be obtained elsewhere but use week 20 as an example
dateadd("ww",weeknumber,yearstart)
Rob

Similar Messages

  • J2ME: add a week to the current date

    I want to add a week to the current date but the output has to be a valid date. I can't figure it out how to solve the problem :(.
    Can anybody help me with my problem?
    TIA

    a better approach...
              Calendar today = Calendar.getInstance();
              Date d = today.getTime();
              System.out.println("todays Date="+d);
              today.add(today.DATE, 7);
              Date d1 = today.getTime();
              System.out.println("nextDate="+d1);

  • IAM-3056160:Modify User Profile request cannot set or change attribute Job Code, since it is not defined in the corresponding data set.

    I am trying to modify the value of the field "Job Code" through API I am getting the following error.(OIM11gr2). I do not get this error when updating the other fields. There is a field by the name USR_JOB_CODE in the database. When I poked around I found that there is no Job Code field in the User Form. Any ideas?
    IAM-3056160:Modify User Profile request cannot set or change attribute Job Code, since it is not defined in the corresponding data set.:Modify User Profile:Job Code
    oracle.iam.identity.exception.ValidationFailedException: IAM-3056160:Modify User Profile request cannot set or change attribute Job Code, since it is not defined in the corresponding data set.:Modify User Profile:Job Code
           at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:237)
           at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348)
           at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
           at oracle.iam.identity.usermgmt.api.UserManager_nimav7_UserManagerRemoteImpl_1036_WLStub.modifyx(Unknown Source)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
           at java.lang.reflect.Method.invoke(Unknown Source)
           at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:85)
           at $Proxy2.modifyx(Unknown Source)
           at oracle.iam.identity.usermgmt.api.UserManagerDelegate.modify(Unknown Source)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke

    THanks for your reply. Here is the snippet from User.xml that contains info about job code.
    <entity-attribute>Job Code</entity-attribute>
    <target-field>usr_job_code</target-field>
    <field name="usr_job_code">
    <type>string</type>
    <required>false</required>
    </field>
    <attribute name="Job Code">
    <type>string</type>
    <required>false</required>
    <searchable>true</searchable>
    <multi-valued>false</multi-valued>
    <MLS>false</MLS>
    <multi-represented>false</multi-represented>
    <attribute-group>Basic</attribute-group>
    <metadata-attachment>
    <metadata>
    <name>multi-valued</name>
    <value>false</value>
    <category>properties</category>
    </metadata>
    <metadata>
    <name>user-searchable</name>
    <value>true</value>
    <category>properties</category>
    </metadata>
    <metadata>
    <name>category</name>
    <value>Preferences</value>
    <category>properties</category>
    </metadata>
    <metadata>
    <name>bulk-updatable</name>
    <value>true</value>
    <category>properties</category>
    </metadata>
    <metadata>
    <name>read-only</name>
    <value>false</value>
    <category>properties</category>
    </metadata>
    <metadata>
    <name>visible</name>
    <value>true</value>
    <category>properties</category>
    </metadata>
    <metadata>
    <name>encryption</name>
    <value>CLEAR</value>
    <category>properties</category>
    </metadata>
    <metadata>
    <name>display-type</name>
    <value>TEXT</value>
    <category>properties</category>
    </metadata>
    <metadata>
    <name>system-controlled</name>
    <value>false</value>
    <category>properties</category>
    </metadata>
    <metadata>
    <name>max-size</name>
    <value>512</value>
    <category>properties</category>
    </metadata>
    <metadata>
    <name>custom</name>
    <value>false</value>
    <category>properties</category>
    </metadata>
    </metadata-attachment>
    </attribute>
    I am able to retrieve the value of the Job Code attribute without any problem with the following code.
    System.out.println("JOB Code: "+user.getAttribute("Job Code"));

  • Sums up the last 4 weeks from the start date

    Hi all,
    Pls tell me how to find the give issue with example
    How to write queri in SQL
    sums up the last 4 weeks from the start date selected (meaning range of date 1st to 7th) (the 4 weeks should stop on the 31st).
    Thanks & Regards

    <DIV><FONT size=2>
    <P><FONT size=2>select</FONT></FONT> tstdate, weeks, (sum*<FONT
    color=#0000f0>7</FONT>) as sum<BR>from <SPAN
    class=224524108-18042006>  </SPAN>(select to_date(<FONT
    color=#0000f0>'&date'</FONT>,<FONT color=#0000f0>'dd-mon-rrrr'</FONT>) as
    tstdate,<BR><SPAN
    class=224524108-18042006>                    
    </SPAN>last_day(to_date(<FONT color=#0000f0>'&date'</FONT>,<FONT
    color=#0000f0>'dd-mon-rrrr'</FONT>)) as weeks, <BR><SPAN
    class=224524108-18042006>                    
    </SPAN>floor((last_day(to_date(<FONT color=#0000f0>'&date'</FONT>,<FONT
    color=#0000f0>'dd-mon-rrrr'</FONT>)) - to_date(<FONT
    color=#0000f0>'&date'</FONT>,<FONT color=#0000f0>'dd-mon-rrrr'</FONT>))
    /<FONT color=#0000f0>7</FONT>) as sum <BR><SPAN
    class=224524108-18042006>          
    </SPAN>from dual)<FONT size=2></P></FONT></DIV>

  • FM that gives number of day in the week for the given date

    Hi,
    I have a requirement to find the number of the day in a week for the given date. For example, 07/09/2009 is Thursday & 4th day of the week. Is there any FM to accomplish this task?
    Appreciate your help in Advance.
    Thanks,
    Kannan.

    Hi Kannan,
    ISH_GET_DAY_OF_WEEK.
    Regards,
    Dilek

  • What are the corresponding Data Types of some MDM Data Types

    Hi Guys,
    The MDM ABAP API involves creation of a DDIC structure in SRM. This structure should have the same fields with the MDM table fields. We would like to ask the corresponding ABAP Data Types for the following MDM Data Types.
         MDM                                                         SRM
    1.  Look up (flat)
    2.  Look up (taxonomy)
    3.  Look up (heirarchy)
    4.  Look up (qualified flat look up)
    Any significant inputs on this?
    Thanks and regards,
    RE

    Hi,
    Refer the below link. This is from the MDM Reference guide and contains the sample source code as well for almost all the things like creating repository, creating tables and fields etc. It would be helpful to you.
    http://help.sap.com/saphelp_mdm550/helpdata/en/47/5fd3f7cbd75518e10000000a421138/frameset.htm
    Regards,
    Jitesh Talreja

  • Crystal reports 2011 failure to pull the master data for AP Items

    I am using businessobjects 4.0 and i am also running crystal report 2011.I am connecting to a sap erp ecc 6.0 ehp4 without any issue.The challenge comes when trying to input or pick the master data for example company code .The crystal report does not populate the company code field with master data.Any suggestions?

    Hi Venkateswaran,
    FIrst of all thanks for offering help...
    uploding screen shots, below mentioned screens are captured when I was creating a new report on CR2011, usning SAP standard table "T001", there is no parameters, it is simple report but I didnot get data, if i browse the field through Cystal report is says Data Size is 0.
    I also would like to inform you that If i use crystal report 2008 SP3 for same ERP, Same table and same fields, then i get proper data/report.

  • Get the first and the last date of a week

    Hi all
    I need to get the first and the last date of a specific week.
    I need a function that returns two date passing it just one date.
    The function has to calculate the first and the last date of the week of the argument date.
    hope to be clear
    regards

    goiters,
    I need to get the first and the last date of a specific week.Yup, and what's the first day of the week in your part of the world, is it Sunday or Monday?
    I need a function that returns two date passing it just one date.No you don't, just add 7 days to the start of the week.
    hope to be clearWell, you can hope.
    Keith.
    Message was edited by: corlettk - now I hope to clear ;-)

  • How to find the Day on a Week for any given Date

    Hi..... I need your help to find out the Day on a Week for any given Date .
    Say if the Date is 31/12/2009 , what would be the Day on a Week for this Date.
    Are there any fucntions available to determine the same?
    Please let me know....Thanks in Advance
    Regards
    Smita

    Hi ,
    You can using the following peice of code to get the Day of a Week for the given date :
    Calendar now = Calendar.getInstance();   
    System.out.println("Current date : " + (now.get(Calendar.MONTH) + 1)  
         + "-" + now.get(Calendar.DATE) + "-" + now.get(Calendar.YEAR));
    //create an array of days  
    //Day_OF_WEEK starts from 1 while array index starts from 0        
    String[] strDays = new String[]{"Sunday",  "Monday", "Tuesday", "Wednesday",  "Thusday",   "Friday",  "Saturday" };   
    String day_of_week = strDays[now.get(Calendar.DAY_OF_WEEK) - 1];     
    System.out.println("Current day is : " + strDays[now.get(Calendar.DAY_OF_WEEK) - 1]  );
    Edited by: Ritushree Saha on Jun 4, 2009 1:09 PM

  • Converting seconds value to a date

    Hi,
    I have date column as integer like 1212638737.Could anyone tell me the way of converting this value to corresponding date value?

    user11365275 wrote:
    I have date column as integer like 1212638737.Could anyone tell me the way of converting this value to corresponding date value?How is the number to be converted to a date? Its not a Julain date because the number is way too big

  • Why is the wrong date displayed in the month view?

    Hi there,
    I just noticed something in the calandar for iOS7. If you are in the month view, the highlited date is the the priviuse day (fx will highlight the 18 Sep when we have the 19 Sep). but if you go in to the week view, the correct date is highlighted. Any idea's???

    I had the same problem...in Calendar/Month view, the calendar heading (top left) did not match what was shown. For example, I would be seeing January 1 to 31 and the heading would be December.  As I scrolled down the months, the heading would lag one month behind. With guidance from Apple, I did a iCloud backup, then did a factory reset.  With the "new iPad" everything worked well.  I then downloaded my backup (all my data and apps) and the problem came back.  Tried a couple of things and what eventually solved the problem was removing the gTask app (which I had tried but was not using), then did a "Reset All Settings...no data erased) and now everything is working as it should.  Seems to me that there is a conflict with the Apple apps and gTask.

  • Using the same data field on a report

    Post Author: Lukey1972
    CA Forum: General
    Hi can anyone help me please? New to crystal reports and I have added the same Data field on a report being and I need to filter these one for Credits and the other for Debits. When I use Select Expert it effects both columns. I know that there is a logical way of doing this but being new have yet to be able to find it. Please help.

    Post Author: DHBelgium
    CA Forum: General
    Hi there,
    you can put a block filter on the data saying ex facturation is equal to c or to d leaving you only with credit or debit amounts.
    Are you using webi?
    Greetz,
    David

  • How does the Global Data Plan affect my limits while still in the states?

      I turned on the Global Data Plan for a trip next week.  Will my normal data limits apply while still in the states this week?

        Hi KBKB,
    I wish you a safe trip next week. The Global Data Plan has no impact on the data plan you would use in the states because they cover data differently at a separate cost and data allowance. Do you need more details on our Global Data plan? Visit http://vz.to/1oEXUCa.
    Thank you! EdW_VZW
    Follow us on twitter @VZWSupport

  • Converting "01Jan2008" to week in the year

    Is there a function in Microsoft Excel to convert a date to a week in the year ? I know this is an Oracle site but I figure there is overlap.

    Is there a function in Microsoft Excel to convert a
    date to a week in the year ? I know this is an Oracle
    site but I figure there is overlap.You figure there's an overlap between a relational database and a spreadsheet? If you had said there was an overlap between Oracle and Access I could see where you're coming from but not Oracle and Excel.
    Anyway here's the help from MS Excel...
    WEEKNUM
    Returns a number that indicates where the week falls numerically within a year.
    If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
    How?
    On the Tools menu, click Add-Ins.
    In the Add-Ins available list, select the Analysis ToolPak box, and then click OK.
    If necessary, follow the instructions in the setup program.
    Syntax
    WEEKNUM(serial_num,return_type)
    Serial_num   is a date within the week. Dates should be entered by using the DATE function, or as results of other formulas or functions. For example, use DATE(2008,5,23) for the 23rd day of May, 2008. Problems can occur if dates are entered as text.
    Return_type   is a number that determines on which day the week begins. The default is 1.
    Serial_num Week Begins
    1 Week begins on Sunday. Weekdays are numbered 1 through 7.
    2 Week begins on Monday. Weekdays are numbered 1 through 7.

  • Convert date to week of the year in Query designer

    Hi,
    I have a requirement to convert date ( a characteristic in the query) to week of the year. For eg. if the date is 01/11/2008 then the week to be displayed is 2008/44.
    Please not that the week is not populated in the Infocube of the same. So i need to convert it in the query designer only.
    Please suggest if you have ideas.
    Regards
    Sapna

    Hi,
    I am trying to get the data by using a virtual characteristic. The problem is i am not able to debug METHOD : IF_EX_RSR_OLAP_BADI~COMPUTE. Can u please help me to reach the breakpoint within this.
    Done....
    Sapna
    Edited by: Sapna Jaiswal on Dec 2, 2008 11:21 AM

Maybe you are looking for

  • LaserJet 1200 driver problem

     HP Laserjet 1200 printer with Windows 7...   The problem is that a 4x6 sheet is fed through the center of the printer but win7 wants to print as if the 4x6 sheet were fed through the left side of the printer.  Any suggestions are welcomed.  Thank yo

  • Two problems with N95.

    Hi, Ive got two problems I need help with. Ive been using an N95 for almost a year until I recently lost it. So I called up my network provider and they sent me a new one (covered by my insurance) but for some reason the signal strength is very weak

  • Pivot a table

    Hi All, I have this query: select columnA, columnB ,sum (Case when wType='FULL' then YEAR_1 else 0 end) as FULL_1 ,sum (Case when wType='FULL' then YEAR_2 else 0 end) as FULL_2 ,sum (Case when wType='PART' then YEAR_1 else 0 end) as PART_1 ,sum (Case

  • Macbook pro serial no C1******H2G. But I don't know the admin password & I'm not given with the OSX CD. Now how I can unlock my macbook pro.

    Hello, I recently bought a refurbished macbook pro which serial no is C1******H2G. I can't open this coz I was not provided with any admin password. Point to note here I have not any operating system CD also. Now how can I unlock my macbook pro ?? <

  • Lighttpd fails to start - no error messages given [solved]

    Lighttpd stopped working all of a sudden.  I removed it, nuked /etc/lighttpd/lighttpd.conf and re-installed lighttpd and using the default /etc/lighttpd/lighttpd.conf from the PKG with no modifications.  When I attempt to start it, I get a FAIL messa