Date Breakup with Monday First Day of Week for Fortnight

Post Author: Guggu
CA Forum: Formula
Hi,
I am using a cross tab and I am trying to break up the data by the reporting periods we use, which is 2 weeks and is from Monday of Week 1 to Sunday of week 2.
I use the GROUP OPTIONS in Crystal report XI and tell it ot show FOR EACH TWO WEEKS but shows the dates with SUNDAY the first day of the week.
I had some BASIC SYNTAX which used to work in v8.5 and some times works for XI but not this time, so i would like to know if there is a better way to work this out as all my reports need to be done this way.
The BASIC SYNTAX i had was:
Dim ew1 As Date Dim rosterdate As Date Dim i As Number Dim fortnight As Date  rosterdate = cdate({?StartDate}) + 70 ew1 = cdate({?StartDate}) ew1 = ew1 + 13 For i = 1 To 10
    If rosterdate <= ew1 Then        fortnight = ew1        formula = fortnight        Exit For     End If
    ew1 = ew1 + 14Next i
But this is not working anymore.
Can someone please help.
Kindest Regards,
George

I just realized that the .../CatalystScripts/Java_DatePicker.js was modified on April 1st, but not by me. Did you do that?
The weekdays were sorted by Monday to Sunday, but the number of the days were not right. So today it showed Tuesday the 6th of April (of course it should be Monday).
My client just contacted me, that they have a mess with the reservations, people did reservations with the wrong date
I already changed it to the previous version. I think, I will implement a jQuery-datepicker, the BC datepicker is not flexibel enough.

Similar Messages

  • First Day of Week in Data Entry Profile

    Does anyone know if there is a standard SAP RFC i can use in my Web Dynpro application to get the First Day of Week entry in a user's Data Entry Profile?
    Thanks,
    -Kevin

    Hello Kevin,
    Function Module returns the System Date from that SAP System(R/3). I have checked this BAPI with '200743 - current week' GET_WEEK_INFO_BASED_ON_DATE, it returns proper data like Start Date and End Date.
    I Assume, you are using this in your Java WD. You can write your own function for this. This will return the day of the week.
    Calendar xmas = new GregorianCalendar(2007, Calendar.SEPTEMBER, 23);
    int dayOfWeek = xmas.get(Calendar.DAY_OF_WEEK);
    wdComponentAPI.getMessageManager().reportSuccess("Day : "+dayOfWeek);
    Note : - week starts with 0 . 0 - Monday 6 -Saturday.
    Regards,
    Sridhar

  • ESS: Change First Day of Week in Date Navigator

    G'day everyone,
    We are on NW2004S, i.e. ECC6 + EP7 + ESS 1.0. I'm having a hard time getting the Date Navigator, i.e. the value help for date fields in ESS, to use Monday rather than Sunday as first day of the week.
    I have managed to customise the Team Calendar (and the other calendars in ESS) to start on Monday rather than Sunday by changing the FirstDayOfWeek property of the calendar element using <Ctrl>-right-mouse-click in Portal Content administration, so that displays ok now.
    However, trying to do the same for the date navigator, i.e. doing a <Ctrl>-right-mouse-click just makes the date navigator disappear (actually it happens the moment I press the <Ctrl> key).
    Am I doing something wrong here? Is there any other way to customise the FirstDayOfWeek property of the Date Navigator of WebDynpro for JAVA iViews in EP7?
    Thanks a lot for your help and best regards!
    Andree

    On 2/13/2013 12:36 AM, thgeiger wrote:
    >
    > Hi,
    > after upgrading from GW8.02 to GW2012SP1 the first day of week in
    > WebAcc and CalPub is Sunday again. Under GW8.02 I had configured the
    > first day as Monday (in a configuration file) Unfortunately I don't
    > remember which file it was?
    > Any ideas?
    > Kind regards,
    > Thomas
    >
    >
    Here's an old post, don't have time to confirm still true
    'm been looking around and trying to find out about the function
    "firstDayOfWeek", but I now finally found out it is much easier than that.
    Solution:
    Find the CssResources_xx.properties file (where xx is the language you
    want to change for) in the
    tomcat\4\webapps\gw\WEB-INF\classes\com\novell\webaccess\templates\css
    directory.
    Look for Calendar.Week.startDay=1 and change that to 2 for Monday. Do
    this for all language properties files you need.
    Stop and start tomcat and voil*.
    Regards,
    Patrick

  • Function Modules to get First day of week, month, Year

    Can anyone name the Function Modules for getting First day of week, month ,year.

    to get first day of week use this function;   WEEK_GET_FIRST_DAY
          CALL FUNCTION 'WEEK_GET_FIRST_DAY'
               EXPORTING
                    WEEK         = '201107'
               IMPORTING
                    DATE         = l_date
               EXCEPTIONS
                    WEEK_INVALID = 1
                    OTHERS       = 2.
    with DATE_COMPUTE_DAY function you can get date number in week.
    CALL FUNCTION 'DATE_COMPUTE_DAY'
           EXPORTING
                DATE = workdate
           IMPORTING
                DAY  = day_of_week_num
           EXCEPTIONS
                OTHERS  = 8.
      CASE day_of_week_num.
        WHEN 1.
          hold_day_of_week = 'Monday'.
        WHEN 2.
          hold_day_of_week = 'Tuesday'.
        WHEN 3.
          hold_day_of_week = 'Wednesday'.
        WHEN 4.
          hold_day_of_week = 'Thursday'.
        WHEN 5.
          hold_day_of_week = 'Friday'.
        WHEN 6.
          hold_day_of_week = 'Saturday'.
        WHEN 7.
          hold_day_of_week = 'Sunday'.
        WHEN OTHERS.
          hold_day_of_week = 'invalid'.
      ENDCASE.

  • Calendar.app not showing First Day of Week selected in iCal

    I have selected Monday as the first day of the week in iCal. After syncing, Calendar.app on my iPhone 4 does not show Monday as first day of week. My original iPhone 2G (3.1.3, jailbroken) does show the correct start day, Monday.)
    I do not need assistance with my iPhone 2G. I need a solution for my iPhone 4.
    How do I get my iPhone 4 to be in sync with my other calendars?

    That's a real pain. I'm in Australia and the regional settings have Monday as the first week, which throws me out because all my calendars and even settings in iCal have Sunday as the first day of the week (which is what it's supposed to be). To get what I want, I have to set my country as New Zealand, and this messes up my phone number formats (closest to Australia than any of the others that start the week correctly though). It should be an option in the settings!

  • Changing first day of week in Calendar help

    Hi,
    I want to change the first day of week from Monday to Sunday in Webdynpro ABAP screen's default calendar help. I implemented BADI CALENDAR_DEFINITION to change the first day of week, it worked for SAP GUI calendar help but not working for WebDynpro ABAP screen.
    Thanks,
    Alok

    Hi,
    Try using the data type TVDIR-GENDATE for date field. It will populate serach help Calendar and it should trigger the BADI from web dynpro also.
    Refer SAP Help. It is pointing to the same BADI.
    http://help.sap.com/saphelp_nwpi711/helpdata/en/3d/e53642e2a3ab04e10000000a1550b0/frameset.htm
    Thanks,
    Jyothi

  • Year-to-date behaviour when filtered on day-of-week

    In our data warehouse design, the time dimension has - amongst others - following columns:
    - day id [ = YYYYMMDD format ]
    - day of week [ = name of day of week: Monday, Tuesday, ... ]
    - week id [ = IYYYIW format ]
    - year id [ = IYYY ]
    Our fact table, which contains turnover information, has - amongst others - following columns:
    - net amount [ = physical table column containing numeric value ]
    - net amount ytd [ = logical column: ToDate(net amount, year id) ]
    An analysis was built based upon this dimension and fact table, which is filtered with prompted values. Prompts are foreseen for week and day of week.
    When filtering on week the behaviour is very much as expected; the "net amount" is assigned the total net amount of the chosen week, and the "net amount ytd" is assigned the total net amount for the year up to the chosen week.
    When adding day-of-week to the filter condition however the result is not as expted; the "net amount" is assigned the total net amount for the chosen day in the chosen week, as hoped for, but the "net amount yet" still is assigned the total net amount for the year up to the chosen day of the chosen week, while I would expect it to be the total net amount of all chosen day-of-weeks (for example, all Tuesdays) of the year up to the Tuesday in the chosen week.
    Having a look at the query behind the analysis, the (simplified) code for the YTD information looks like this:
    SELECT SUM("net amount")
    FROM   "fact",
           "time dimension" td1,
           "time dimension" td2
    WHERE  td1."week id" = (prompt week value)
    AND    td1."day of week" = (prompt day of week value)
    AND    td1."year id" = td2."year id"
    AND    td2."week id" <= td1."week id"
    AND    fact."day id" = td2."day id"As I said, it is simplified, OBIEE in fact uses a bunch of sub queries and ranking sequences to pull this off, but this is in a nutshell the result. And as seen in the query, the second occurence of the time dimension is not filtered on day of week, which results in the YTD sum for all days, not just Tuesdays, or whatever day was selected.
    It makes sense in a way, after all, filtering on week does not limit the second occurence of the time dimension to filter on week either. But is there any way to force OBIEE to make an exception and come up with following query (or something similar that does the trick):
    SELECT SUM("net amount")
    FROM   "fact",
           "time dimension" td1,
           "time dimension" td2
    WHERE  td1."week id" = (prompt week value)
    AND    td1."day of week" = (prompt day of week value)
    AND    td1."year id" = td2."year id"
    AND    td2."week id" <= td1."week id"
    AND    td2."day of week" = (prompt day of week value)
    AND    fact."day id" = td2."day id"Thanks in advance for your input.
    Edited by: Kurt Geens on Mar 12, 2013 2:52 PM

    805771 wrote:
    Yes, but I don't want to create 7 different jobs, one for each day of the week. Isn't there a way to do this in PL/SQL? It took me 10 seconds in SQL Server's TSQL.Yes you keep showing some TSQL syntax that obviously does not do what you are asking for.
    >
    SELECT
    CASE DATEPART(dw,GETDATE())
    WHEN 4 THEN (SELECT COUNT(*) FROM ADR_VLDN )
    ENDSo the equivalent in Oracle would be
    SQL> var n number
    SQL> begin
      2    if to_char(sysdate,'D') = '4' then
      3      select count(*) into :n from dual;
      4    end if;
      5  end;
      6  /
    PL/SQL procedure successfully completed.
    SQL> print n
             N
             1Also takes 10 seconds.

  • First day of week in Clock app - Alarm

    I changed the first day of week to Monday in Settings -> Mail, Contacts, Calendars -> Start Week On. However, it still shows Sunday as the first day in Clock -> Alarm -> Repeat -> Weekdays. How can I set Monday in the Clock app? Thanks.

    On 2/13/2013 12:36 AM, thgeiger wrote:
    >
    > Hi,
    > after upgrading from GW8.02 to GW2012SP1 the first day of week in
    > WebAcc and CalPub is Sunday again. Under GW8.02 I had configured the
    > first day as Monday (in a configuration file) Unfortunately I don't
    > remember which file it was?
    > Any ideas?
    > Kind regards,
    > Thomas
    >
    >
    Here's an old post, don't have time to confirm still true
    'm been looking around and trying to find out about the function
    "firstDayOfWeek", but I now finally found out it is much easier than that.
    Solution:
    Find the CssResources_xx.properties file (where xx is the language you
    want to change for) in the
    tomcat\4\webapps\gw\WEB-INF\classes\com\novell\webaccess\templates\css
    directory.
    Look for Calendar.Week.startDay=1 and change that to 2 for Monday. Do
    this for all language properties files you need.
    Stop and start tomcat and voil*.
    Regards,
    Patrick

  • First day of week in WebAccess and CalendarPublisher

    Hi,
    after upgrading from GW8.02 to GW2012SP1 the first day of week in WebAcc and CalPub is Sunday again. Under GW8.02 I had configured the first day as Monday (in a configuration file) Unfortunately I don't remember which file it was?
    Any ideas?
    Kind regards,
    Thomas

    On 2/13/2013 12:36 AM, thgeiger wrote:
    >
    > Hi,
    > after upgrading from GW8.02 to GW2012SP1 the first day of week in
    > WebAcc and CalPub is Sunday again. Under GW8.02 I had configured the
    > first day as Monday (in a configuration file) Unfortunately I don't
    > remember which file it was?
    > Any ideas?
    > Kind regards,
    > Thomas
    >
    >
    Here's an old post, don't have time to confirm still true
    'm been looking around and trying to find out about the function
    "firstDayOfWeek", but I now finally found out it is much easier than that.
    Solution:
    Find the CssResources_xx.properties file (where xx is the language you
    want to change for) in the
    tomcat\4\webapps\gw\WEB-INF\classes\com\novell\webaccess\templates\css
    directory.
    Look for Calendar.Week.startDay=1 and change that to 2 for Monday. Do
    this for all language properties files you need.
    Stop and start tomcat and voil*.
    Regards,
    Patrick

  • First Day of Week in Gnome Calendar

    One day I noticed that the first day of the week in my gnome calendar is was Monday instead of Sunday.  I have no idea what caused this change, but nothing I can do seems to be able to change it to Sunday.  This is the mini Calendar that pops up when you click on the clock on the panel.  any ideas?

    On 2/13/2013 12:36 AM, thgeiger wrote:
    >
    > Hi,
    > after upgrading from GW8.02 to GW2012SP1 the first day of week in
    > WebAcc and CalPub is Sunday again. Under GW8.02 I had configured the
    > first day as Monday (in a configuration file) Unfortunately I don't
    > remember which file it was?
    > Any ideas?
    > Kind regards,
    > Thomas
    >
    >
    Here's an old post, don't have time to confirm still true
    'm been looking around and trying to find out about the function
    "firstDayOfWeek", but I now finally found out it is much easier than that.
    Solution:
    Find the CssResources_xx.properties file (where xx is the language you
    want to change for) in the
    tomcat\4\webapps\gw\WEB-INF\classes\com\novell\webaccess\templates\css
    directory.
    Look for Calendar.Week.startDay=1 and change that to 2 for Monday. Do
    this for all language properties files you need.
    Stop and start tomcat and voil*.
    Regards,
    Patrick

  • CRM onDemand Calendar - Configure First Day of Week?

    Hi guys,
    by default, the calendar is showing Sunday as the first day of week in the CRM calenadr. is it possible to configure any settings to have monday as the first day?

    Mika, at this time it is not possible to configure the first day of the week.

  • SelectInputDate set first day of week

    Hi all! I was trying to change the first day of week showed in the calendar (Ex. set the first day the Monday) but i dont find any results :(
    Someone know how to change it?
    Many thanks.
    Jose.

    Hi Jose, <br>
    <br>
    Unfortunately, this is not possible in JDeveloper 10.1.3<br>
    See "<a href="http://blogs.oracle.com/Didier/2007/02/26#a218"> Setting the First Day of the Week to Monday in the SelectInputDate component</a>" for more details. <br>
    <br>
    Regards, <br>
    <br>
    Didier.<br>
    <br>

  • Deriving first day of week ww in year yyyy

    I need to be able to display the first day of a particular week in addition to the 'week-of-year' and year; for example:
    select to_char("ServiceDate",'yyyy-ww') as "Year/Week", sum("Points") as "Points"
    from my_table
    group by to_char("ServiceDate",'yyyy-ww')
    order by to_char("ServiceDate",'yyyy-ww')will give me the following:
    Year/Week     Points
    2008-33            1                     
    2008-35            1                     
    2008-42            4                     
    2008-43            2                     
    2009-01            1                     
    ...and so forth. What I would like to add to the dataset is the actual day that is the first day of the week for that Week/Year. For example, the first row would look like this:
    Year/Week     1st day of week     Points
    2008-33          08-AUG-2008*         1*Or whatever the first day of week 33 of year 2008 is (assuming 'first day of week' is a Sunday, for my purposes).
    My brain is on 'dim' right now; any and all assistance is greatly appreciated.
    Thanks in advance,
    Carl

    select  to_char(trunc("ServiceDate",'ww'),'yyyy-ww') as "Year/Week",
            to_char(trunc("ServiceDate",'ww'),'DD-MON-YYYY') "Week Start Date",
            sum("Points") as "Points"
    from my_table
    group by trunc("ServiceDate",'ww')
    order by trunc("ServiceDate",'ww')
    /SY.

  • Which subscription is best for a non profit organization (with limited funds) who needs CC for 1 day a week for maybe 2 or 3 months?

    Which subscription is best for a non profit organization (with limited funds) who needs CC for 1 day a week for maybe 2 or 3 months?

    Hi sonnetje,
    Kindly go through Creative Cloud pricing and membership plans | Adobe Creative Cloud
    If you need it for 2-3 months please check of month-to-months plan as the Annual membership comes with a contact and there would be an early termination fee attached to it. which is 50% of the remaining months.
    For more info check the below mentioned link.
    Link : Cancel your membership or subscription | Creative Cloud
    Thanks,
    Atul Saini

  • Query for log Parser to get number of hits in a day or week for particular web applications or site collection

    Hi All,
    Want to get the number of hits in a day for a web application with IIS logs. so need to know Query for log Parser to get number hits in a day or week for particular web applications or site collection. Kindly help
    Regards,
    Naveen

    I'm trying to get this from WSS 3.0, Hence using the Log Parser

Maybe you are looking for