Need to display days for every "X" weeks

I have start and end dates, along with specific days of the week that I'm outputting.
However, I need to display them every "X" week but I'm not sure how to do that.
For example: show Monday, Wednesday, and Friday for every 2 weeks (or every 3, 4,5 weeks).
Can someone shed some light?
TIA

Another option, depending on what you are really trying to do.
Loop from day A to day B.
If current itteration of the day is a designated day of the week [dayOfWeek(currentDay)] do one thing, else do another.
If current itteration of the day is the end of the week [I.E. dayOfWeek(currentDay) is 7] then break the display to a new week.
There are probably other ways to do this as well.  The date time functions could probably give you some ideas.
http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_05.html#1098968

Similar Messages

  • How can I display summary for every 15 minutes using DATE datatype

    This is probably an easy question, but the answer eludes me...
    I am trying to write a SQL report that displays aggregate totals for every 15 minute period. I know you can do something like this to get every minute:
    select to_char(import_date,'MM-DD-YYYY HH24:MI'),
    count(*) from
    package_ingest
    group by to_char(import_date,'MM-DD-YYYY HH24:MI')
    But how can I change this query so that I get every 15 minutes?
    Any feedback is greatly apprecaited!
    Thanks,
    -ADK

    Hi,
    GROUP BY  TRUNC (SYSDATE) + FLOOR ( (import_date - TRUNC (SYSDATE))
                                          * 24
                            * 4
                            )SYSDATE is an arbitrary reference point. It doesn't matter if import_date is earlier or later (or sometimes earlier and sometimes later).
    If you want to display this in the SELECT clause, or use it in the ORDER BY clause, then repeat the expression there, or compute it once in a sub-query.
    WITH  got_i_d_15     AS
         SELECT     TRUNC (SYSDATE) + FLOOR ( (import_date - TRUNC (SYSDATE))
                                               * 24
                                 * 4
                                 ) AS i_d_15
         FROM     package_ingest
    --     WHERE     ...          -- If needed
    SELECT       TO_CHAR (i_d_15, 'MM-DD-YYYY HH24:MI')     AS import_date
    ,       COUNT (*)                               AS cnt
    FROM       got_i_d_15
    GROUP BY  i_d_15
    ORDER BY  i_d_15;

  • Need to pull records for full work week two weeks back

    I wanted to pull the results from two date fields and calculate the lapsed time. Both dates in the calculation are from the same field, so I used the command feature in Crystal to differentiate the two
    SELECT max("A"."CREATED_DATE") as installerContactCreatedDate,
    TO_NUMBER("A"."OBJECT_KEY")
    FROM "OMS"."AUDITS" "A"
    WHERE "A"."ATTRIBUTE_NAME" = 'installerContact'
    AND "A"."CREATED_DATE" > SYSDATE - 16
    group by "A"."OBJECT_KEY"
    SELECT max("A"."CREATED_DATE") as dateScheduledCreatedDate,
    TO_NUMBER( "A"."OBJECT_KEY")
      FROM "OMS"."AUDITS" "A"
      WHERE "A"."ATTRIBUTE_NAME" = 'dateScheduled'
    AND "A"."CREATED_DATE" > SYSDATE - 16
    group by "A"."OBJECT_KEY"
    Incidently: u201CAND "A"."CREATED_DATE" > SYSDATE u2013 16u201D was used to limit the results from a huge table and u201816u2019 has no real significance other than trying to return the minimal results for the report.
    once I had the above I used this:
    datediff("H",{Command.INSTALLERCONTACTCREATEDDATE},{Command_1.DATESCHEDULEDCREATEDDATE})
    Now to what I need to do; if I provided too much info I am sorry, I just was hoping to give enough.
    I need the results  for a full work week; the catch is I donu2019t need it for the previous week but for two weeks back; i.e. if I ran the report  on Monday the 19th  I want to pull records from the 5th to the 9th
    I know that this formula:
    {Command.INSTALLERCONTACTCREATEDDATE} in
      CurrentDate - DayofWeek(CurrentDate) - 5
    to CurrentDate - DayofWeek(CurrentDate) u2013 1
    will pull the prior full business week (m-f); i.e.  ran on Monday the 19th- pulls records for the 12th to 16th, no good for me.
    Furthermore, if the field is populated late Friday afternoon and field is not populated until the next week I need to capture that on the following weeks report- eventhough the first part was populated the prior week.
    So, report runs Mon. the 19th captures 5th to 9th, but  is populated the 9th and the is not populated til the 12th, 13th, or 14th then that cant show on report for week of 5th to 9th, but on the report for 12th to 16th.
    Iu2019d greatly appreciate any assistance and apologize if I made little to no sense when describing my issue.

    Try:
    SELECT max(case when a.attribute_name = 'InstallerContact'
                        then "A"."CREATED_DATE" else null end) as installerContactCreatedDate,
                 max(case when a.attribute_name = 'dateScheduled'
                        then "A"."CREATED_DATE" else null end) as dateScheduledCreatedDate,
         TO_NUMBER("A"."OBJECT_KEY")
    FROM "OMS"."AUDITS" "A"
    WHERE
    ("A"."ATTRIBUTE_NAME" = 'installerContact'
       AND "A"."CREATED_DATE" > SYSDATE - 45) 
    OR
      ("A"."ATTRIBUTE_NAME" = 'dateScheduled'
       AND "A"."CREATED_DATE" between SYSDATE, - datepart("dw", sysdate) - 13
                                                 and SYSDATE - datepart("dw", sysdate) - 7 )
    group by "A"."OBJECT_KEY"
    having max(case when a.attribute_name = 'dateScheduled'
                        then "A"."CREATED_DATE" else null end) is not null
    (where datepart("DW", <date>) returns the day of week.  It's not clear what DB you are using.)
    This assumes that the installer date is within 32 days or so of the scheduled date.  Increase the 45 (or remove the date condition altogether - but that would be very slow on a big table) if that's not the case.
    sysdate - datepart() returns the prior Saturday,
    subtracting 7 days is the end of your week period (Saturday) two weeks ago,
    subtracting 13 is the Sunday of your week period two weeks ago.
    The case statement within the max() database aggregate functions will be null, and therefore not effect the results, if the attribute name is not the one we are interested in at the moment.
    The having clause will restrict the returned records to those objects scheduled within the week of interest.  (Since the WHERE clause is using an OR, there may be records with installerContact date > 45 days ago, but the dateScheduled is not within our week of interest.  In that case, the max() in the HAVING clause will be null.)
    And it's all done with one database query! 
    HTH,
    Carl

  • How to display image for every article in smartforms

    DEAR GURUS ,
    i want to display material
    (mara-matnr) as well as its image for every material in a smartform .how will i code for this and where will i store my image .
    full points will be awarded for the solution . plz send any sample code .
    THANKS ,
    AMIT RANJAN .

    hi,
    upload logos using se78 transaction.
    then create a window in ur smartform and insert that graphic.
    for sample codes check these examples.
    SF_EXAMPLE_01
    SF_EXAMPLE_02.

  • Getting the Last day for a given week number

    Dear Gurus,
    I want to find the Last day of a given week number.
    Can anyone help me out.
    Regards
    Madhu K

    Here I dont want to pass date,
    If I give Week Number, Can I get that Week Numbers
    Last date and First Date.
    test@ORA10G>
    test@ORA10G> -- this query fetches the start and end dates for a specified week in the current year
    test@ORA10G>
    test@ORA10G> select
      2    wk as week,
      3    min(dt) as start_date,
      4    max(dt) as end_date
      5  from (
      6    select
      7      trunc(sysdate,'yyyy')+level-1 as dt,
      8      to_char(trunc(sysdate,'yyyy')+level-1,'ww') as wk
      9    from dual
    10    connect by level <= trunc(add_months(sysdate,12),'yyyy') - trunc(sysdate,'yyyy')
    11  )
    12  where wk = &week_number
    13  group by wk;
    Enter value for week_number: 1
    WE START_DAT END_DATE
    01 01-JAN-08 07-JAN-08
    test@ORA10G>
    test@ORA10G> /
    Enter value for week_number: 23
    WE START_DAT END_DATE
    23 03-JUN-08 09-JUN-08
    test@ORA10G>
    test@ORA10G> /
    Enter value for week_number: 52
    WE START_DAT END_DATE
    52 23-DEC-08 29-DEC-08
    test@ORA10G>
    test@ORA10G> /
    Enter value for week_number: 53
    WE START_DAT END_DATE
    53 30-DEC-08 31-DEC-08
    test@ORA10G>
    test@ORA10G>pratz
    can be shortened further:
    test@ORA10G>
    test@ORA10G> select
      2    to_char(trunc(sysdate,'yyyy')+level-1,'ww') as wk,
      3    min(trunc(sysdate,'yyyy')+level-1) as start_dt,
      4    max(trunc(sysdate,'yyyy')+level-1) as end_dt
      5  from dual
      6  where to_number(to_char(trunc(sysdate,'yyyy')+level-1,'ww')) = &week_number
      7  connect by level <= trunc(add_months(sysdate,12),'yyyy') - trunc(sysdate,'yyyy')
      8  group by to_char(trunc(sysdate,'yyyy')+level-1,'ww')
      9  /
    Enter value for week_number: 1
    WK START_DT  END_DT
    01 01-JAN-08 07-JAN-08
    test@ORA10G>
    test@ORA10G> /
    Enter value for week_number: 53
    WK START_DT  END_DT
    53 30-DEC-08 31-DEC-08
    test@ORA10G>
    test@ORA10G> /
    Enter value for week_number: 23
    WK START_DT  END_DT
    23 03-JUN-08 09-JUN-08
    test@ORA10G>
    test@ORA10G> /
    Enter value for week_number: 14
    WK START_DT  END_DT
    14 01-APR-08 07-APR-08
    test@ORA10G>
    test@ORA10G>Message was edited by:
    pratz

  • Start day for global agenda week view

    Does anyone know if there is a way to change the first day of the week for the global agenda week view? For example, instead of having the week start on Monday, it starts on Sunday.

    Hi Christopher,
    The WEEKDAY function allows specifying either Sunday or Monday as the first day of the week:
    WEEKDAY
    The WEEKDAY function returns a number that is the day of the week for a given date. WEEKDAY(date, first-day)
      date:  The date the function should use. date is a date/time value. The time portion is ignored by this function.
      first-day: An optional value that specifies how days are numbered.
    Sunday is 1 (1 or omitted):  Sunday is the first day (day 1) of the week and Saturday is day 7.
    Monday is 1 (2):  Monday is the first day (day 1) of the week and Sunday is day 7. Monday is 0 (3):  Monday is the first day (day 0) of the week and Sunday is day 6.
    But I think you are referring to the first day of the 'workweek', for which I do not see a means of defining a custom value.
    Since you want to 'insert categories', though, you could easily define your own, using WEEKDAY(date) or WEEKDAY(date,1), plus an IF statement to return the category label appropriate to the day. Here's one for a Sunday to Thursday work week. Dates are in column A, the formula is in whichever column you want as the Category column. For the example, I've placed it in column B.
    B2, and filled down: =IF(WEEKDAY(A)<6,"Work","Off")
    The top table shows the weekday numbers returned for each day of the week for each of the three permitted values for the optional second argument. The bottom table shows the results from the formula above, used to define a category label for each date:
    A10 was left blank intentionally, to determine if the lack of data resulted in an error. The Warning message, flagged by the blue 'warning' triangle, is "The formula uses a number in place of a date." The 'date' assigned to this numerical value of zero was a Friday, but I'm not certain when. Probably best to avoid extra rows with no date shown.
    Regards,
    Barry

  • AXL: HTTP-Socket needs to be initiated for every packet?

    Hi,
    may be this is a little off-topic:
    I use Java to program AXL-API.
    Example: addRoutePattern. I would like to add 20 route pattern to CM.
    Is there a chance to open a http-socket (once), send the route patterns and close it?
    As far as my experience is, it is not. I have to build for every route pattern an SOAP-packet and it is not successfully, when I don't close the socket after every packet ...
    Any ideas?
    Thanks in advance
    Axel

    2500 RPs? Geez. And I thought my couple hundred was a lot. I actually wrote my axl class lib to automatically wait 10 seconds if it gets the appropriate http repsonse.. that way I can rapid fire and the server throttles my requests.
    I guess the question of whether you can keep the socket open or not comes down to what HTTP standard the server supports - it takes HTTP 1.1 to keep a socket open.

  • Need to Display Data for Cummulated to Current Day of Current Fiscal Year

    We use fiscal variant V3 (April-March).  My need is to display data automatically from first of fiscal period (April 1 2006) to today.
    I tried using 0CYTCD on Calendar Day but this works only for the current calendar year that the system is in  i.e 2007.
    Is there a standard variable I can use on 0CALDAY so I always get data from day one of current fiscal year/period to today? e.g. April 1, 2006 to January 3, 2007
    If not, can someone please help with the exact customer exit code that I would need to write in CMOD in BW?
    Thanks a ton!

    I thought of using 0FYTCD variable, but I cannot find it in the business content.
    Has anyone used 0FYTCD (Fiscal year to current day) in BW 3.1 SP25?
    Again, I am looking for a variable that would get me the beginning of fiscal year to today.
    Thanks.

  • How do you fix this?:  When I sign in to Facetime on my Macbook Pro it says: "Our Servers Cannot Process your Request. Please try again later."   I have tried again "later" every day for almost 3 weeks and it doesn't work. How can I fix this?

    As I stated above, There is a Facetime error. can someone please help?

    Read here:
    http://support.apple.com/kb/TS4185

  • ICan't ReInstall my computer  please help. need to use Mac for school next week

    I use my Mac for School and stuff happened.
    Long story short.
    1) I tried to reset my Mac Book Pro  computer and I did.( by pressing option key and go to disk utility and erase tab and erase)
    2) then I know I was supposed to go to Reinstall OS X Lion and I did but I quit. (took 10 hrs and plus my internet is bad and couldn't DL the other stuff)
    3) I remembered that I had a recovery disk. so I inserted it and I went to the disk utility, dragged the Macintosh HD to the restore tab, destination, and it copied my recovery disk data? to my Machintosh HD and the name of it changed to Mac OS X Base System ( the name of my recovery disk)
    4) and I tried to restart, shut down my computer, it sends me to the same Mac OS Utilities. Again.
    5) so I went to Reinstall Mac OS Lion, agreed, and the download destination usually should be the Macintosh HD ( for me its Mac OS X Base System right now) but it said it is locked (because I'm dumb) and i can't install it now.
    6) i don't know what to do now because this is not my computer that I'm sending this support from. and I can't use my original Mac Book. what should I do?
    AND I NEED TO USE THE MAC NEXT WEEK FOR SCHOOL.
    more info: MacBook Pro 13 inch Late 2011 ( got it for christmas)
    OS 10.7.5 ( recovery disk is 10.7.2)
    had no problems for 2 years.
    Why is Internet bad? Japan. thats why.
    For those who wonder why I wanted to reset/restore my MacBook Pro or, want to hear the long story:
    I play League of Legends, Steam, Osu! on my Mac and it took alot of capacity (or space).
    And League of Legends has thisthing called "Item sets" that when you save it, it doesnt save it in the client (or app),  it saves the "item sets" data in your computer (took alot of capacity/space)
    Not just that, and I had iPhoto but when i downloaded iLife to my mac, and after that, it said my iPhoto is damaged and it can't open.
    And summer ended, my parents said If I fail my 11th grade, they are going to kick me out so I told them I'm going to reset my Mac to factory settings and get a fresh start, well this happened.

    hi there! I got it back to work by buying the USB version of Mac OS X Lion 10.7
    and since my internet connections are kinda bad, I'm not able to download and update it to 10.7.5.
    but anyways I got it back to work.
    All I can say is I suggest you to buy the USB version of Mac OS X Lion 10.7 from amazon or apple store.

  • Displaying timestamp for every message on Android

    A recent update to Skype for Android has removed the display of timestamps for messages. I currently have 5.0.3.
    How do I re-enable this so messages have timestamps displayed in the same way as for the Windows version?
    Why was this feature removed? Why do software developers feel the need to tinker with things that work well and remove features?

    From another thread I found that you can tap on a message and see its timestamp (but no others) displayed.
    This is OK, but it's no substitute for being able to display all timestamps all the time if you want to.
    Message to developers. Don't just impose change on us. Let *us* choose. If you introduce a change or new feature, allow us to configure whether or not we want to turn it on.

  • How do i set a reminder for every 4 weeks on iphone4. 5.01.

    Hi
    Is there a way to do this ? Onyy have monthly !!
    An integrated app or something ???
    Find not having this feature VERY poor....
    Cheers

    its a WYSIWYG setup. only 2 week option on that list.
    Here is a site that gives you 30 different calendar alternatives
    http://iphone.appstorm.net/roundups/productivity-roundups/30-awesome-alternative -calendar-apps-for-iphone/

  • Why does fglrx need to be updated for every Xorg release?

    Guess: Because of the libraries they're linking to? I may be imagining things but it seems the nvidia driver is less loosely tied to it and will work with any recentish version of X. I'm pretty sure I've upgraded X before without upgrading the nvidia driver and everything continued to work fine. If I'm not imagining things, why don't they do what nvidia is doing?
    Last edited by ernesto (2011-11-27 16:18:22)

    nVidia has to update their drivers to support recent X.Org just like AMD does. nVidia however includes support for the newest X.Org to their drivers as soon as it is reasonable to do so, whereas Catalysts are always lagging behind the upstream. When an updated X.Org hits Arch's extra, chances are that you already have a compatible nVidia driver, with AMD it's not until after several weeks or months after new X.Org release when they update the drivers.

  • Ipad 4 how to add event for every 4 weeks ios 7

    This is a monthly appointment but it's on the same day at the same time.  How can I add this to the calendar?  Thanks.

    I would also have a look at Pocket Informant, this is a significantly more sophisticated calendar / task manager than the inbuilt calendar but it does cost.....
    I have used it for about 5 years both on the iPhone / I pad and an HX 4700 and it is just brilliant.
    Xerxers

  • Need newer display driver for my Satellite A350D

    Hi guys,
    I've a problem with 1 game.
    Can someone help me refresh my driver ? I've ati mobility radeon hd 3650
    My notebook is Toshiba Satellite A350D. please :)

    Hi Elios
    You asking for driver but for what system?
    Generally speaking the Toshiba EU driver page provides all drivers for Toshiba EU notebook series.
    If you need another version, you will need to search somewhere in the net on 3rd party pages for independent, modified drivers.

Maybe you are looking for

  • Wireless setup in a secured school network

    Our elementary school has an HP Photosmart Premium e-All-in-One C310 printer. This printer was purchased to be used with Apple iPads because it is on Apple's list of Airprint enabled printers. We are having trouble connecting it to our wireless netw

  • My Skype will not open.

    I'm having a problem.  My Skype won't open and I've tried everything that I can find.  This support forum isn't the easiest thing to get to in order to ask questions either.  I have Windows 7, I've tried installing and uninstalling, I've tried renami

  • Problem in Message No. ABADR101

    When I creating PR or PO, system always pop up a warning message: ABADR101 u201CError occurred in derivation rule. See long textu201D While I changed the u201Cplantu201D, the PR or PO can be post. I realized thereu2019s similar question here, but I s

  • Pages '09 refuses to create/open existing doc after Lion upgrade

    Ok, I just upgraded to Mac OS X Lion (10.7), now when I lauch Pages (version 4.1 build 923), it hangs at the template chooser and never returns. If I disable the template chooser at startup and attempt to open a document created previously, I am pres

  • 'private' hard disk space

    This question is mainly due to curiosity. The hard disk space on my MacBook is nearly full and I am trying to empty it. I have used Disk Inventory, as suggested on a discussion here, and have found 4Gb of something called 'private.' I assume this is