Calander Return Monday of the Week Selected

Hi,
New to Oracle & ApEx so getting used to the development enviroment and syntax =)
Anyhow my issue:
I have a small calander on the side of my page and I want to return the monday of the week that the user selects on the calander, so for example if the user clicks on
24/07/2008 - (THURSDAY )
then I want to return
21/07/2008 - (MONDAY )
or simmlarly
26/09/2008 - (FRIDAY )
then return
22/09/2008 - (MONDAY )
and so on
I am currently just returning the item to a text box (called P3_DATEPICKED) and to do this I have the following code in "Day Link" of the "Calendar Attributes" (with "Target is a" set to "URL")
f?p=&FLOW_ID.:3:&SESSION.::&DEBUG.::P3_DATEPICKED:#DD#/#MM#/#YYYY# - (#DAY#)
so what do I need to change to get the previous monday to the date picked?
Also on a side note, I have noticed (as seen above) that there are spaces after the day and before the right bracket ")", is there a reason for that?
Many thanks
Sylvan

if you just want to list the 7 day names, then you can do this
select to_Char( trunc(sysdate,'D')+level-1, 'fmDy - Day') from dual connect by level<=7;
TO_CHAR(TRUNC(S
Sun - Sunday
Mon - Monday
Tue - Tuesday
Wed - Wednesday
Thu - Thursday
Fri - Friday
Sat - Saturday
7 rows selected.and it France, it starts with Monday
SQL> alter session set nls_territory=france;
Session altered.
SQL> select to_Char( trunc(sysdate,'D')+level-1, 'fmDy - Day') from dual connect by level<=7;
TO_CHAR(TRUNC(S
Mon - Monday
Tue - Tuesday
Wed - Wednesday
Thu - Thursday
Fri - Friday
Sat - Saturday
Sun - Sunday
7 rows selected.

Similar Messages

  • Search help for the "Week Select option"

    Hi Experts,
    My selection screen is like this:
    Article:  .............. to ..............
    Week  .............    to ...............
    I am taking article EKPO-MATNR field.and week S012-SPWOC field
    Now there is there search help for the S012-SPWOC field. How can I create the seach help for this fields.
    Regards
    Krishan

    hi,
    try this way.
    tables: ekpo, s012.
    select-options:article for EKPO-MATNR,
                    week for S012-SPWOC.
    Regards,
    Shankar.

  • "File Dialog" Express VI returns the wrong path when the user selects the desktop

    In labview 8.0.1 with Windows
    XP, the File Dialog Express VI seems to return something other than the path
    selected by the user when configured to browse for folders (or files and
    folders) and the user selects the desktop.
    I can't determine exactly when it works and when it fails, but it always seems
    to fail if the user selects the desktop from the places bar (the shortcuts on
    the left side of the dialog) or from the drop-down menu at the top of the
    dialog and then clicks the "Current Folder" button to dismiss the
    dialog.  In this case it always returns whatever path is wired to the
    "Start Path" terminal.
    If the user navigates to the desktop with the "Up One Level" button
    or by selecting the actual desktop directory under Documents and Settings, the
    correct path is returned.
    If the user selects a file before clicking the desktop icon, then clicks
    "Current Folder" the correct path is returned.
    If the user clicks the desktop icon, clicks open, then clicks "Current
    Folder" the correct path is returned.
    It's possible to work around this bug in most cases by setting the start path
    to the desktop.
    Has anyone seen this behavior before?
    Can anybody verify this behavior by running the attached VI?
    In the past, when I've reported issues like this I've received responses from
    NI engineers that basically said "Thanks, but we already knew
    that".  Is there anywhere that users can search the list of known
    bugs and avoid wasting time tracking down issues that are already understood by
    NI?
    Thanks,
    Adam Brewster
    Attachments:
    File Dialog Test.vi ‏39 KB

    I'm on 8.2 and I can't get it to fail no matter how I select the desktop. I haven't tried it in 8.0, but I imagine that if this really is a bug, they did know about it and fixed it with 8.2. If this causes a real problem for you, I would suggest upgrading if you can.

  • Display Aggregated  numbers for all the weeks – Need immediate help

    Requirement is , Get the case count (#of Cases), and Case Worked (“ #of worked Case”) and Number of Solution (“# of Solutioin”) for the next 5 weeks base on selected week
    Case detail has in “Case Fact”, Worked details has in “ Activity fact”, Solution details has in “Solution Fact” all the three are join base “Case Dimension” and “Date Dimemsion”
    User will select Monday of the week, Case count should display for the selected week but Case worked and # of deliveries should display for next 5 weeks for the 1 weeks Cases.
    just notes..# Of Case count should stay same (sleeted week) but remaining thing need to calculate base on Cases selected on 1 week..
    Currently I am calculating selected week + 4 week to get data but # Cases also getting incremented but it need to stay 1 week total any help??
    Expected report output..
         Week1     Week2     Week3     Week4     Week5
    # Cases      10     10     10     10     10
    # Cases Worked 2     3     5     5     8
    # of Solution     0     1     2     3     6
    Thanks in Advance.

    I had the same problem the other day--my totals were listed, but all the other categories under "History" (Last Workout, Recent Workouts and Personal Best) were empty.
    I figured everything was lost, but decided to plug my nano back into my MacBook and let it mount in iTunes, then unmount it. I checked the History again. The first time, nothing changed. So I plugged and mounted again. The second time after unmounting, I navigated to the History menu, and suddenly the nano screen displayed a "Loading History" and it slowly loaded all my workouts. A few minutes later, all the History data was available again.
    Try that--plug and unplug several times, being sure to allow the nano to properly mount in iTunes before unmounting--to see if you can get the history to load.
    (One more thing to note--my nano is set to NOT automatically sync with iTunes, as I prefer to manually manage my music. I don't know if this will make a difference in the handling of workout data, but figured I should mention it here just in case.)

  • ITunes Store Australia / Movie of the Week

    Does anybody know how often does the Australian iTunes Store change their movie of the week selection? It seems more like a movie of the month or even more than that...
    The US store makes changes to their features every Tuesday, how about Oz? Can anybody enlighten me..?
    Thanks -
    Adelaide-based US expat

    Don't hold your breath mate: no rules here.
    Sometimes it's a week but more often it seems like 6-8 weeks they stick with one discounted title. ***** big time, but nothing you can do. I've e-mailed them several times but to no avail.

  • In SQL server, how can I pass a date and return on any specific day of the week (e.g. Sunday/Monday/Wednesday, etc.)

    In SQL server, I want to be able to have a function to return the date of any specific day of the week by passing two parameters. E.g.:
    parameter 1: a selected date (e.g. 8/3/2013)
    parameter 2: any specific day of the week (e.g. Wednesday)
    result: should be 7/31/2013 (8/3/2013 is a Sunday in the week 7/28 - 8/3, so the Wednesday should be 7/31/2013)
    then if I want to get Saturday of that week, I can simply change the second parameter to 'Saturday'
    Thanks.

    Wrong forum:
    http://www.microsoft.com

  • Oracle returning incorrect day of the week

    Hi there,
    I have a table named Performance, which includes a date field named PDATE, some other attributes such as title, etc, and a field named WEEKDAY, which includes the numerical value for the day of the week. Here is an example:
    PER#
    P#
    THEATRE#
    WEEKDAY
    PDATE
    PHOUR
    PMINUTE
    COMMENTS
    1
    1
    1
    1
    02-MAR-10
    19
    30
    Normal evening time
    2
    1
    1
    2
    03-MAR-10
    19
    30
    Normal evening time
    58
    6
    6
    3
    04-MAR-10
    19
    30
    Normal evening time
    5
    1
    1
    4
    05-MAR-10
    19
    30
    Normal evening time
    I went to verify the day of the week in a calendar (in fact I checked more than one) and I noticed that the Weekday value seems incorrect. For instance, the 2nd of March was a Tuesday so I would expect WEEKDAY to say 3 (considering Sunday to be the 1st day of the week, which is the universal norm), or perhaps 2 (considering Monday to be the 1st day of the week).
    First thing that came to mind is, since the WEEKDAY is a number field which has been pre-populated, the person who populated it made a mistake.
    So I went to verify this by running a query that would give me the correct day of the week by extracting it from the PDATE field:
    SELECT DISTINCT pdate, EXTRACT(year from pdate) year,
    to_char(to_date(pdate,'DD/MM/YYYY'),'DY') weekdaycalc, weekday
    FROM ops$yyang00.Performance
    ORDER BY pdate
    And to my astonishment, I got the following table as a return:
    PDATE
    YEAR
    WEEKDAYCALC
    WEEKDAY
    02-MAR-10
    2010
    SUN
    1
    03-MAR-10
    2010
    MON
    2
    04-MAR-10
    2010
    TUE
    3
    05-MAR-10
    2010
    WED
    4
    06-MAR-10
    2010
    THU
    5
    07-MAR-10
    2010
    FRI
    6
    08-MAR-10
    2010
    SAT
    7
    09-MAR-10
    2010
    SUN
    1
    10-MAR-10
    2010
    MON
    2
    As you can see, all of the above WEEKDAYCALC values are incorrect, and seem to match the incorrect values in WEEKDAY.
    I could perhaps understand some weird WEEKDAY numbering if there is some general database setting where I could specify any day of the week to be the first day. However, I can't think of any logical explanation on why Oracle would call a Tuesday Sunday.
    Could someone please advise what I mght be doing wrong? This is driving me insane!
    Thank you in advance for all the help and support.
    Regards,
    P.

    Hi,
    1bded5c7-e555-4306-ac86-45da83dff439 wrote:
    Thanks both Frank and Solomon for the help. I am quite new to Oracle and I feel you folks went the extra mile on the explanation
    Based on your explanations, I changed the formula so the date format would be processed as YY rather than YYY.
    SELECT DISTINCT pdate, EXTRACT(year from pdate) year,   
    to_char(to_date(pdate,'DD/MM/YY'),'DY') weekdaycalc, weekday   
    FROM Performance   
    ORDER BY pdate  
    And I got the correct values now:
    PDATE
    YEAR
    WEEKDAYCALC
    WEEKDAY
    02-MAR-10
    2010
    TUE
    1
    03-MAR-10
    2010
    WED
    2
    04-MAR-10
    2010
    THU
    3
    05-MAR-10
    2010
    FRI
    4
    06-MAR-10
    2010
    SAT
    5
    07-MAR-10
    2010
    SUN
    6
    08-MAR-10
    2010
    MON
    7
    The interesting bit here, is the original WEEKDAY field, which clearly has been created with the same mistake I did (this whole table wasn't created by me). I reckon I spotted a design bug.
    Regards,
    P.
    No; you're still calling TO_DATE on something that is already a DATE, and you're still using an implicit conversion (only now you're using a format such that the current NLS settings don't cause you to get punished.  If your DBA changes the NLS settings next week, then you will have similar errors again.)
    If you want to see what day of the week pdate is, then use:
    TO_CHAR (pdate, 'DY')
    or, to make it NLS-independent:
    TO_CHAR (pdate, 'DY', 'NLS_DATE_LANGUAGE=ENGLISH')
    This is simpler than what you posted, it's more efficient and easier to debug and to maintain, and it also gets the results you want in all cases.
    One more time: TO_DATE, as the name hints, converts something (a VARCHAR2, to be precise) TO a DATE.  If pdate is already a DATE, then what do you need to convert?  You're implicitly converting a DATE to a VARCHAR2, then explicitly converting that VARCHAR2 back to a DATE, and then calling TO_CHAR.  That's 3 function calls (1 of them error prone) where only 1 is needed.
    Also if you ever have to reconcile 2-digit years with 4-digit years (and, again, in this problem you don't) the correct way is to convert the 2-digit year to a 4-digit year, not vice-versa.
    Calling Tuesday the 1st day of the week could make sense in a particular application.

  • How can I create a new calendar that starts the week on monday?

    Excel can do it, but I really like the template for calendars in numbers. That calendar is for printing it, so i don't need any special functionalities, only the template, with blank cells i can hand-write in.
    Thanks!

    Hi And95es,
    The Calendar template is very clever. Changing it to start on Monday would be a huge task. Here is an idea for a non-automatic calendar. Start with a table for month and year. Hide the table name if you like.
    A1 is a pop-up menu to choose a month. Type the year in B1.  I am trying to come up with a formula to show the day of the week for that month and year in B2. This is because you will have to type a 1 into the correct day in the calendar table to generate dates for the whole month.
    Create an  outline calendar like this:
    A2 contains the number 1
    B2=A2+1 and fill right
    A4=G2+1
    B4=A4+1 and Fill Right.
    Now select Row 4 and copy.
    Paste into every second row below.
    Format the table to make cells big enough to write in. Save as Template because you are about to make a calendar and you will need the template for next month.
    Type a 1 into the cell that is the first of that month. Now clear contents of cells you don't need.
    It would be handy to have a formula to show weekday for the first of the month. Not essential!
    Regards,
    Ian.

  • Calendar crashes -  Monday as 1st day of the week

    I have an ipad1, running iOS 5.1.1. It's sync to iCloud. I deleted entries to Sept 1. It was stuck on month view of September. I couldn't change it to another month or view.
    I soft reset. no change.
    I hard reset. no change.
    I factory reset and restored iPad with Itunes and restored old settings. no change.
    I factory reset iPad with iTunes as new ipad. Calendar was behaving.
    I went into settings and personalised it.
    It's is now September. when I click on September month view Calendar crashes. Other views are ok. Month view of other months is ok.
    Then I realised that to have a the month view starting on Monday as the first day, I have the general>international>region format set as UK (I'm in Australia). When I set it back to Australia, then Calendar doesn't crash.
    So the factory reset served to reset the region to my local region.
    The work around for Apple changing the Calendar start day to Sunday was to change the region to one where the start day was Monday. It had been working fine until recently. I'm not sure when the crashing started happening, perhaps on the last iOS update.
    So, it may have been that a mismatch in local region to region designated on the settings that crashes the Calendar. It may be that selecting UK crashes the Calendar.
    Now, Calendar crash problem solved. This might help someone else with the same problem.
    Calendar format starting on unpreferred day reintroduced.
    I would like to see my month view start the day as Monday, not Sunday. Does anyone have a solution?

    Thanks .
    I've managed to fix it:
    Go to Settings / Mail Contacts and Calendars / Start the week on
    Change from Sunday to Monday.
    It appears people in Brazil are the only ones affected.
    It's a good work-around  while apple does not fix this bug.
    https://discussions.apple.com/message/23578143#23578143#23578143

  • Want to make Monday as the first day of the week in GregorianCalendar. how?

    hi
    I need to know what day is the first of the month is. for example the 1st of Nov 2004 is Moday and 1st of Dec 2004 is saturday.
    I am using the GregorianCalendar:
    1.  GregorianCalendar calendar = new GregorianCalendar(2004,11,1);    //set date to 1st Nov 2004
    2.  int firstDay = calendar.get(Calendar.DAY_OF_WEEK);now firstDay is 2. This is because the week starts from Sunday, so Monday is the 2nd day.
    But I am in Uk and my Uk Calendar shows monday as the first day (even in Windows 2000 Calendar).
    I would like the GregorianCalendar to have Monday as the first day of the week, so that the
    int firstDay = calendar.get(Calendar.DAY_OF_WEEK);
    returns 1 in the above case.
    I also tried adding
    calendar.setFirstDayOfWeek(Calendar.MONDAY); just between line 1 and line 2, but it did not help.
    This is because i don't want to manually subtract 1. If i manually subtract one, then the program might not work in other locale and timezones.
    Also if I subtract 1, then for 1 Feb 2004,
    int firstDay = calendar.get(Calendar.DAY_OF_WEEK);
    will return 1 as 1st Feb 2004 falls on Sunday. so if i subtract 1 it will be 0, so I have to do a extra checking for 0.
    Is there anyway to make the Calendar have Monday as the first day of the week??
    Tanveer

    hi
    I need to know what day is the first of the month is.Why does this matter? Since we know that 1 == Sunday and 2 == Monday... Why do you need Monday to be == 1? and couldn't you just subtract 1 if it's so important?
    for example the 1st of Nov 2004 is Moday and 1st of
    Dec 2004 is saturday.
    I am using the GregorianCalendar:
    1.  GregorianCalendar calendar = new
    GregorianCalendar(2004,11,1);    //set date to 1st Nov
    2004
    2.  int firstDay = calendar.get(Calendar.DAY_OF_WEEK);now firstDay is 2. This is because the week starts
    from Sunday, so Monday is the 2nd day.
    But I am in Uk and my Uk Calendar shows monday as the
    first day (even in Windows 2000 Calendar).
    I would like the GregorianCalendar to have Monday as
    the first day of the week, so that the
    int firstDay = calendar.get(Calendar.DAY_OF_WEEK);
    returns 1 in the above case.
    I also tried adding
    calendar.setFirstDayOfWeek(Calendar.MONDAY);[/cod
    ] just between line 1 and line 2, but it did not help.
    This is because i don't want to manually subtract 1.
    If i manually subtract one, then the program might not
    work in other locale and timezones.
    Also if I subtract 1, then for 1 Feb 2004,
    int firstDay = calendar.get(Calendar.DAY_OF_WEEK);
    will return 1 as 1st Feb 2004 falls on Sunday. so if i
    subtract 1 it will be 0, so I have to do a extra
    checking for 0.
    Is there anyway to make the Calendar have Monday as
    the first day of the week??
    Tanveer

  • Days of the week Record selection

    Hi All,
       I have 7 days of week boolean parameters for which when the user selects the date range, they can also filter which days of the week to use within that date range.
    Any ideas on how I can implement this in my record selection formula?
    Thank you in advance.

    Hi,
    You can make use of the DatePart formula
    The following formula will return which day of the week for a particular week.
    Eg:
    The field I am evaluting here Command.DocDate
    If I want to return Wednesday sales then I put in the following in record selection.
    DatePart ("w",{Command.DocDate}, crMonday) = 3

  • TS4000 The Week Starts on a Monday Apple!!!

    Please tell me how to get the Calendar on my 4S to start the week on Monday as it always did prior to the recent iOS upgrade. Apart from the fact that it's wrong, it's also highly annoying!!!

    Hi, believe it or not I've checked that loads of times and the region is already correctly selected. It's so annoying to have your weekend split either side of the working week when you're trying to plan ahead using this calendar. You should be able to selct your preference - I'm fairly sure I used to be able to do so with Apple products... Come on Apple sort it out!!!

  • I am trying to find out if I can change a setting of the calendar in my iPhone.   When I view calendar, in month, I would like to view it with the starting day of the week being Monday, not Sunday.  Is it possible to make this change? SS

    I am trying to find out if I can change a setting of the calendar in my iPhone. 
    When I view calendar, in month, I would like to view it with the starting day of the week being Monday, not Sunday.  Is it possible to make this change?

    Hello SMEvans32
    You can use iCloud to share the Calendar, that way she will always be up to date on that particular section of your work calendar. If you want to use iCloud, I would recommend backing up so you have a safe copy of your data.
    iCloud: Calendar sharing overview
    http://support.apple.com/kb/PH2689
    iCloud Setup
    http://www.apple.com/icloud/setup/
    Thanks for using Apple Support Communities.
    Regards,
    -Norm G.

  • United Kingdom Regional Format sets Monday as the first day of the week.

    With the Region Settings (Settings -> General -> International -> Region Format) set to United Kingdom, Calendar displays Monday as the first day of the week. I have seen other posts whereby it was suggested to change to US Internationalization but this will also change the date and telephone number formats to US settings, far more frustrating.
    Have I been sheltered from properly formatted calendars all my life or is this a mistake and it should start the week on Sunday. It is consistent in both the Week and Month view.
    Am I crazy or does anyone else agree with is?

    Same here. One of the first things I do in this sort of application is switch week start to Mondays.
    Terry, East Grinstead, UK
    Message was edited by: Terry P

  • Change first day of the week from Monday to Sunday(0CALWEEK)

    Hello!
    We have a report that display the data at a calendar week level. The start of the week currently show as Monday( retreived from FM - WEEK_GET_FIRST_DAY).
    Is there a global setting in source system to change the start day of the week from Monday to Sunday? I can always make this change in the transformation but would like to know if there is a global option to make this change so the rest of the reports display the same.
    Thanks
    Sirisha

    You can check this SAP Note 624627 - Sunday first day of the week also a working day (Collective)
    Might be helpful.
    Regards,
    AL

Maybe you are looking for

  • How do I include the photos in a imovie project to the finished dvd so the users can have access to them?

    I've included alot of old photos in an iMovie project and would like to include them on the finished DVD I create with iDVD. I woud like the users to be able to have access to them so they can print them, store them on their own computer or whatever

  • Using setTimeout function in APEX

    Hi, I am trying to show a print dialog box after which I need to take confirmation from the user whether the printout has come fine or not. For acheving this I am trying to use setTimeout in javascript which is not working. The confirmation box is co

  • Connection failures on vidoe chat

    Has anyone encountered communication failure message when trying to establish a video chat session. This occurs consistently when I try to connect with another MacBook Pro user. After several reboots on both our parts we sometimes get a session going

  • Question related smf service config

    Hello, I'm trying to create some smf manifests which should start some java vm which represents a whole application. There are for example a vm which is the jndi, a vm which works as jms and a "first" app which is called "manager". So I created a man

  • Change link properties

    This question was posted in response to the following article: http://help.adobe.com/en_US/contribute/cs/using/WS5b3ccc516d4fbf351e63e3d1180fba3730-7cd1. html