Hide 0 Before Month And Year

I m using this query to generate the sequence
     SELECT     TO_CHAR (SYSDATE, 'MM')
                         || TO_CHAR (SEQ.NEXTVAL)
          || TO_CHAR (SYSDATE, 'YY')
      FROM   DUAL;Result is
061210906 is the month
121 is the sequence
09 is the year
I want to hide 0 before month and year also.
Looks like this
*61219*

but the out put is wrong
SQL> SELECT     TO_CHAR (SYSDATE, 'fmMM')
  2       || TO_CHAR (SEQ.NEXTVAL)
  3            || TO_CHAR (SYSDATE, 'fmYY') format_date
  4        FROM   DUAL
  5  /
FORMAT_DATE
62259it should be
SQL> SELECT     TO_CHAR (SYSDATE, 'fmMM')
  2       || TO_CHAR (SEQ.NEXTVAL)
  3            || TO_CHAR (SYSDATE, 'YY') format_date
  4        FROM   DUAL
  5  /
FORMAT_DATE
622509

Similar Messages

  • Hide days from WebElements component WECalendar (show only month and year)

    Dear expert,
    I'm using WebElements to replace standard InfoView parameter screen for my Crystal Reports. My question is:
    1. Is it possible to customize WebElements component: WECalendar so that we only see Month and Year, but not the Days (in other words to hide the days from the calendar).
    If not possible then is there any other WebElements component that i can use for this purpose?
    Because i only need to pass value of month and year selected by user when jumping to other report (using OpenDocument).
    2. When i looked at the code, i'm afraid the only way is by editing the HTML part that is marked with:
    // *** do not modify the code below
    Since there's no available variables for hiding the days in the section that can be modified:
    // *** the code below can be modified to change the formatting to the desired look and feel
    Below is some of the code of the WECalendar component:
    Function (stringvar ElementName, datevar ElementDefault, stringvar MonthDisplays, stringvar DayDisplays)
    // *** the code below can be modified to change the formatting to the desired look and feel
    // calendars use the stringvars below if nothing is entered into the WECalendar function for these parameters
    if DayDisplays="" then DayDisplays:= 'Su|Mo|Tu|We|Th|Fr|Sa'; // note that there must be two characters for each day...or use " " as in 'S |M |T |W |T |F |S ' 
    if MonthDisplays="" then MonthDisplays:= 'January|February|March|April|May|June|July|August|September|October|November|December';
    // the font below is for the month & year display in the calendar and can be modified
    stringvar headerfont:= WEFont('Verdana', 11, 'Navy', '', true, false,"","");
    // the font colour and size below can be modified...this is for the arrows that change the month or year of the calendar
    stringvar arrowfont:= WEFont('Arial', 10, 'Gray', '', false, false,"","");
    // these fonts for the calendar days must be a fixed width font such as Lucida Console or the calendar spacing will break
    stringvar datefont:= WEFont('Lucida Console', 8, 'Black', '', false, false,"","");
    stringvar daystringfont:= WEFont('Lucida Console', 8, 'Black', '', false, false,"underline","");
    stringvar weekendfont:= WEFont('Lucida Console', 8, 'Gray', '', false, false,"","");
    stringvar inputfont:= WEFont('Lucida Console', 8, 'Navy', 'Center', false, false,"","");
    // *** do not modify the code below
    Thank you very much.
    Kind regards,
    aswin
    Edited by: Aswin Setyawan Margono on Feb 2, 2011 5:16 PM

    hi Aswin,
    you can always modify any of the webelements controls or create your own if you're feeling adventurous. the "do not modify" is just a warning that the code below is not as customizable as the code above which is made to be easily changed.
    my recommendation for an easy win in your case though is to use the weSelectDuo control having years in the first of the select menus and the months in the second select menu.
    cheers,
    jamie

  • DRQ: Isolate the Daily, Monthly and Yearly CheckBoxes in Selection Criteria

    Module: Financials => Financial Reports => Accounting => General Ledger
    Request to Isolate the Daily, Monthly and Yearly Check Boxes in the General Ledger - Selection Criteria screen, instead of an option in the report window.
    Problem:  If there is BP/General Ledger having long transaction list, then once user un-check any of the check boxes system takes long time to remove/hide those rows which contains Totals. Which is effecting the performance of the report also.  Also those checkboxes appeared with check marked by default.
    If user has an option in the selection criteria screen, then they can choose which Total they want before previewing the report and mark accordingly.
    Thanks & Regards
    Anjan Bhowmick

    Being reached to 10 open question, I am forced to close this thread

  • Problem to insert only month and year instead of full date

    select b.penjara_id, p.penj_lokasi, a.no_daftar, b.episod, b.nama1,to_char(a.trkh_mula_prl,'dd/mm/yyyy') as trkh_mula_prl, to_char(bulan_proses,'mm/yyyy') as bulan_proses,
            b.epd, b.lpd
    from prl_daftar_proses a, senarai_pesalah b, penjara p
    where a.no_daftar=b.no_daftar
    and a.episod=b.episod
    and b.penjara_id = p.penjara_id
    and a.setuju_jplp is null
    and a.bulan_proses between to_date(:FROM,'dd/mm/yyyy') and to_date(:TO,'dd/mm/yyyy')
    order by b.penjara_id, a.bulan_proses,a.no_daftarHi,anyone can help me how i can insert only month and year from the value that have full date in the database??
    for example,the date is 09/18/2012, but i just want to insert 09/2012 as parameter. If i want to insert only one parameter, i can do that..But i have problem when I want to insert two parameters..

    jeneesh wrote:
    Welcome to the forum..
    This..?
    Assuming bulan_proses is a date without time part
    select b.penjara_id, p.penj_lokasi, a.no_daftar, b.episod, b.nama1,to_char(a.trkh_mula_prl,'dd/mm/yyyy') as trkh_mula_prl, to_char(bulan_proses,'mm/yyyy') as bulan_proses,
            b.epd, b.lpd
    from prl_daftar_proses a, senarai_pesalah b, penjara p
    where a.no_daftar=b.no_daftar
    and a.episod=b.episod
    and b.penjara_id = p.penjara_id
    and a.setuju_jplp is null
    and a.bulan_proses between to_date(:FROM,'mm/yyyy') and last_day(to_date(:TO,'mm/yyyy'))
    order by b.penjara_id, a.bulan_proses,a.no_daftar
    i got another problem..
    before that.may i know what is the function of last_day?

  • Function module for getting month and year of the previous month (say -6)

    Hi,
    Is there a function module that will get you the month and year of say, a month before, and as far as 11 months ago.
    For example, say today is 6/2007. I want 7 months ago.
    How do i get this value?
    What function module or method is available?
    Points will be rewarded and responses will be appreciated.
    Thank You,
    John

    Hi
    lv_period gives the month and year which is two months earlier now as we have specified lv_months as -2.
        DATA: LV_PERIOD LIKE S001-SPMON,
              LV_MONTHS(2) TYPE C VALUE '2-',
              LV_DATUM LIKE SY-DATUM,
              LV_NEWDT LIKE SY-DATUM,
            P_SPMON LIKE S001-SPMON VALUE '200601'.
        CONCATENATE P_SPMON '01' INTO LV_DATUM.
        LV_PERIOD = P_SPMON+0(6).
        CALL FUNCTION 'MONTH_PLUS_DETERMINE'
             EXPORTING
                  MONTHS  = LV_MONTHS
                  OLDDATE = LV_DATUM
            IMPORTING
                 NEWDATE = LV_NEWDT
             EXCEPTIONS
                  OTHERS  = 1.
         IF SY-SUBRC = 0.
           LV_PERIOD = LV_NEWDT+0(6).
         ENDIF.
    WRITE :/ LV_PERIOD.
    OR
    Use the following FM for getting the year and the month based on date
    CACS_DATE_GET_YEAR_MONTH
    or
    Call Function 'CCM_GO_BACK_MONTHS '.
    Funny module: 03/31/2002 - 1 month = 02/31/2002
    OR
    RE_ADD_MONTH_TO_DATE ( Add / substract month to/from date )
    Need ur reward points.
    Best regards,
    Ravi

  • Chart: amount (count) of records per month (and year). How?

    I need to create a chart eventually. Can't get what formula to use. The data is:
    1 | 15 Jan
    2 | 20 Jan
    25 | 14 Mar
    26 | 16 Mar
    28 | 20 Mar
    The chart should show amount(count) of records per month(and year). So in this example:
    Jan: 2
    Mar: 3
    Hm... totally lost. Any tips?

    To do this it would be best to add a column in which you isolate the month from the rest of the date information. Here's an example:
    You may hide the Month-Isolated column if it impacts your presentation.
    The Month-Isolated formula is: =IF(ISBLANK(B), "", (MONTH(B)))
    The formula for the count in the Summary table is: =COUNTIF(Data Table :: $C, COLUMN())
    Hope this gets you on your way.
    Regards,
    Jerry

  • Concatenate Date fields as month and year

    Hi,
      I want to concatenate the field bseg-augdt as month and year.
    And have to append as a seperate field (Fiscal month | fiscal year) in the output.
    Plz help me to overcome this issue.
    Thanks and Regards,
    Karthik
    Moderator message: very basic, please try yourself and search for information before asking.
    locked by: Thomas Zloch on Aug 4, 2010 1:22 PM

    Env : ORACLE REPORTS 9I
    I am passing 3 parameters to the report:
    Parameters are of type CHAR
    Report Parameters
    Year / Month :   2005 / AUG
    Effective Date :
    The colunm in table is eff_date
    eff_date
    01/08/2005
    02/08/2005
    03/08/2005
    15/09/2005
    17/09/2005
    18/09/2005
    29/09/2005The problem is:
    1)If I dont enter anything,I just get displayed 2 record for the above.
    It should display all records rather than 2.
    2)If I enter Effective date as 01-AUG-2005,no records are displayed.
    This is my code:
    Select col1,col2
    from   TableA
    where ( TRUNC(ch.eff_date) = nvl (:E_DATE, TRUNC(ch.eff_date) ) 
    AND     TRUNC(ch.eff_date, 'MONTH') = nvl (TO_DATE(:YR||:MTH,                                                                                                          'yyyymon') ,
                                               TRUNC(ch.eff_date) )
          )Shud i change the AND to OR?

  • Needing a multi-month and year-in-view option for ical!

    Hello all!
    I could really use a multi-month and year-in-view format in ical... I've seen some dated posts - is anyone aware of any new developments/options for this?
    thanks and peace-
    DW

    I turn off all calendars but the birthdays. Select [Print]. Choose all the months you want to see. Deselect all calendars but birthdays. Click [Continue]. On the next menu, go to "Layout", select how many pages to print on the paper. I usually print a border around each calendar then you're good to go!
    By only printing the birthdays calenar, you won't get too many appointments to get in the way of brain storming and future planning, yet the computer still thinks its printing a useful calendar.

  • How to get Week,Month and Year details from a date column

    Hi frenz,
    I've a column like tran_date which is a date column..... I need the next week details based on this column and so on...
    I need month and year details as well based on this tran_date column.... can any one tell me how...
    Thanks in advance

    My example for objects:
    create or replace type date_object as object
      centure number,
      year    number,
      month   number,
      day     number,
      hour    number,
      minute  number,
      second  number,
      daypart number,
      week    number,
      constructor function date_object(p_dt date)
        return SELF as result
    create or replace type body date_object is
      constructor function date_object(p_dt date)
        return SELF as result
      as
      begin
        SELF.centure:= trunc(to_char(p_dt,'YYYY')/100);
        SELF.year:=    to_char(p_dt,'YYYY');
        SELF.month:=   to_char(p_dt,'MM');
        SELF.day:=     to_char(p_dt,'DD');
        SELF.hour:=    to_char(p_dt,'HH24');
        SELF.minute:=  to_char(p_dt,'MI');
        SELF.second:=  to_char(p_dt,'SS');
        SELF.daypart:= p_dt-trunc(p_dt,'DD');
        SELF.week:=    to_char(p_dt,'IW');
        return;
      end;
    end;
    select date_object(sysdate),
           date_object(sysdate).year
    from dual;Regards,
    Sayan M.

  • Sales report for current month and year a go month

    i could you please guide me builting report for current monthwise for current month and year a ago month
    report parameter month_year='06-2010'
    tables = sales and below are the table fields
    customer_id
    invoice_dt
    invoice_am
    thanks
    nhm

    Okay, Still you did not mention how you will pass value in report while generating.
    Anyway the query with UNION ALL will work. For Example.
    I am assuming that the parameter for date/month you will pass in range like 01-JUN-2010 to 30-JUN-2010
    SELECT customer_id, SUM(curr_value) curr_value, SUM(past_value) past_value
    FROM
    SELECT customer_id, NVL(SUM(invoice_amount),0) curr_value, 0 past_value
    FROM sales
    WHERE invoice_dt BETWEEN :P_FROM_DATE AND :P_TO_DATE  -- here P_FROM_DATE and P_TO_DATE will be the date range for current year as i showed above.
    AND  -- Any Condition goes here...
    GROUP BY customer_id
    UNION ALL
    SELECT customer_id, 0, NVL(SUM(invoice_amount),0)
    FROM sales
    WHERE invoice_dt BETWEEN ADD_MONTHS(:P_FROM_DATE,-12) AND ADD_MONTHS(:P_TO_DATE,-12) -- This add_months function for the previous year same month.
    AND -- Any condition goes here...
    GROUP BY customer_id
    GROUP BY customer_idNow using the above query you can design the tabular report as you showed the format.
    -Ammad
    Edited by: Ammad Ahmed on Jul 3, 2010 7:55 PM
    added GROUP BY

  • Daily, Monthly, and Yearly Report

    Hi I am new to the BAM. I have a BPM process. I want to generate the daily, monthly and yearly report for it. Please advise how can I achieve it. I have a one dimension variable on the process.
    Thanks in advance!

    Hi,
    Try this query to get default ware house and its quantity and modify above query.
    SELECT T0.[ItemCode], T0.[WhsCode], T0.[OnHand] FROM OITW T0  INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode WHERE T0.[WhsCode] =  T1.[DfltWH] and  T1.[ItemCode]  = [%0]
    Thanks & Regards,
    Nagarajan

  • Table for Material Quantity and Value for particular month and year

    Hi All
    My requirement is that for a particular month and year I want to know the stock quantity and stock value for a particular material for a given plant.From which SAP table can I get this data as I want to fetch data for my Y report?
    Regards
    Satish Kumar

    Hi,
    You can use MB5B table as suggested earlier.also you can use:
    MBEW-VMKUM --> stock for previous month period
    MBEW-VJKUM --> stock for previous year period
    PLease view these links which migh tbe helpful to you:
    http://help.sap.com/saphelp_47x200/helpdata/en/39/55fee3bc6111d4b3960050dadf0791/content.htm
    TableStock
    Thanks
    Nisha

  • Fetching month and year from CV of Time dim

    Hi,
    I am working on BPC 7 MS version, SP3. I need to fetch Month and Year values from my Current View (i.e., %TIME_SET%) .... and if the month is AUG and year is Current I then want a logic to run... Is this possible??
    I have written the following code, and only if i hardcode the time (WHEN TIME IS 2009.AUG) the logic seems to work. But I want it to be dynamic
    *XDIM_MEMBERSET ACCOUNT=INC_REC_IN_AD
    *XDIM_MEMBERSET TIME=%YEAR%.AUG,%TIME_SET%
    *XDIM_MEMBERSET CATEGORY=ACTUAL
    *WHEN ACCOUNT
    *IS *
    *WHEN TIME.MONTHNUM
    *IS 8
    *FOR %YEAR%=%TIME_SET%.YEAR
    *FOR %MONTH%=AUG,SEP,OCT,NOV,DEC
    *REC(FACTOR=1/5,TIME="%YEAR%.%MONTH%",ACCOUNT="TEMPSTUDYEDU")
    *NEXT
    *NEXT
    *ENDWHEN
    *ENDWHEN
    *COMMIT
    Thanks,
    Prasanth.

    I think your formula is correc the %YEAR% is not a valid, Can you trap that and see what is being passed, you may also try to split the year out of %TIME%
    hope it helps.

  • Month and Year in Input Field

    Hi Gurus,
    I m Using SPMON(Period to analyze month and year) as input Field in my BSP Application.
    If i Click the Input Help i want to call a Function module "popup_to_display_month" ..
    How to acheive this.
    I have used onValueHelp attribute in which it will call only the Javascript.
    Please guide me...
    Thanks n Regards
    Aravindh

    Hi Aravindh,
    First thing if this FM 'POPUP_TO_SELECT_MONTH' gives a popup in SAPGUI , you can not use it in BSP since SAP GUI popups are not supported in BSP.
    I have used onValueHelp attribute in which it will call only the Javascript.
    If triggering a server side event using onValueHelp solves you  problem that you can do it as follows..
    1)In the layout somewhere use a blankimage that will not be visible in UI.
    2)Suppose ID of this image is 'blank'
    now call javascript function for onValueHelp
    and in this javascript function use
    dacument.getElementById('blank').click();
    change dacument to document.
    This will trigger a server event which you can process in onInputProcessing and call the FM.
    Regards,
    Anubhav

  • Data element for Month and Year

    Hello All,
    Is there any data element which will have only Month and Year.
    I have to introduce this field in a table. It should have convesion exits also.
    Ex: If i give 092009, it sould come like 09.2009
    Thank you.
    Best Regards,
    Sasidhar Reddy Matli.

    Kindly Try this code for Month and year as input and having standard F4 help..
    INCLUDE RMCS0F0M.
    TYPES : BEGIN OF TY_SELECT,
              MONTH TYPE FTI_MONTH_YEAR,
            END OF TY_SELECT.
    DATA : WA_SELECT TYPE TY_SELECT.
    SELECTION-SCREEN : BEGIN OF BLOCK SANDEEP WITH FRAME.
      SELECT-OPTIONS : S_MONTH FOR WA_SELECT-MONTH OBLIGATORY NO INTERVALS NO-EXTENSION.
    SELECTION-SCREEN : END OF BLOCK SANDEEP.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_MONTH-LOW.
      PERFORM MONAT_F4.
    SANDEEP JAIN

Maybe you are looking for