getting the value of the month

How to get the month value, my intention is that I have to get the month, julian months using it gives values from 1 to 12, but my intention is I want January as a text when 1 is filled and so on. Could you suggest on this.

Thank you
Olivier

Dominique, try this in the default value field: ToChar (Today (), "MMMM")

You can replace the today() with the field variable or the variable you need.

Good luck
Thom

Tags: Oracle

Similar Questions

  • Is there one way other than to_char to get the month of the date field

    Is there one way other than to_char to get the month of the date field

    Hello

    raj4tech wrote:

    Is there one way other than to_char to get the month of the date field

    EXTRACT is one:

    SELECT INTERESTED (SYSDATE MONTHS) AS curr_month

    DOUBLE;

  • get the month and year of date type

    Hi all
    I need to get the month and year of type date.

    For example
    select to_date('2011-01-17', 'yyyy-mm-dd') from dual;
    Required result:
    01-2011
    Any ideas?

    Thanks in advance,
    Bahchevanov.
    select to_char(to_date('2011-01-17', 'yyyy-mm-dd'),'mm-yyyy') from dual;
    

    HTH

  • to get the month and year separated

    Hello

    I have the entry_date_fin of column (type of data-varchar2 (8))

    with values like Apr.-2008
    Feb-2009 etc.

    can I get the distinct month and year separated
    i tried select to_date(entry_date_fin,'MM') FROM  xyz  doesnt wrk
    kindly guide me

    Although you are (wrongly, IMO) storage of dates as strings, just use string manipulation...

    SQL> with t as (select 'FEB-2008' as txt from dual)
      2  --
      3  select substr(txt,1,3) as mnth
      4        ,substr(txt,5) as yr
      5  from t
      6  /
    
    MNT YR
    --- ----
    FEB 2008
    
    SQL>
    
  • How to get the month previous year?

    Hello

    I have to get the previous year three-months of the effective date, but I have a problem since the beginning of the year and it's because I set the incorrect query.

    I mean:

    I wrote this query

    SELECT TO_CHAR(SYSDATE,'YYYYMM')-1, 2-TO_CHAR(SYSDATE,'YYYYMM'), TO_CHAR(SYSDATE,'YYYYMM')-3

    FROM DUAL;

    in order to get (on mars):

    201502, 201501, 201412

    but unfortunately, I get:

    201502, 201501, 201500

    Can you help me?

    Thanks in advance!

    Hello

    Here's one way:

    SELECT TO_CHAR (ADD_MONTHS (SYSDATE-1), "YYYYMM") AS the m1

    , TO_CHAR (ADD_MONTHS (SYSDATE-2), "YYYYMM") AS m2

    , TO_CHAR (ADD_MONTHS (SYSDATE,-3), "YYYYMM") M3

    DOUBLE;

  • GET THE MONTH

    Hello

    I need to generate months between two bays. Last span should be up to sysmonth. I appreciate your time.

    With the help of 10g or 11g
    EFFECTIVE_MONTH     DIST_ID     SHOP_ID     SHOP_NAME
    01/01/2008     P00112     PFR00809     TOKEN GLASSES
    06/01/2009     P00112     PFR00536     MAVALI GLASSES
    Required result
    EFFECTIVE_MONTH     DIST_ID     SHOP_ID     SHOP_NAME     SHOP_MONTH
    1-Jan-2008     P00112     PFR00809     TOKEN GLASSES     1-Jan-2008
    1-Jan-2008     P00112     PFR00809     TOKEN GLASSES     1-Feb-2008
    1-Jan-2008     P00112     PFR00809     TOKEN GLASSES     1-Mar-2008
    1-Jan-2008     P00112     PFR00809     TOKEN GLASSES     1-Apr-2008
    1-Jan-2008     P00112     PFR00809     TOKEN GLASSES     1-May-2008
    1-Jan-2008     P00112     PFR00809     TOKEN GLASSES     1-Jun-2008
    1-Jan-2008     P00112     PFR00809     TOKEN GLASSES     1-Jul-2008
    1-Jan-2008     P00112     PFR00809     TOKEN GLASSES     1-Aug-2008
    1-Jan-2008     P00112     PFR00809     TOKEN GLASSES     1-Sep-2008
    1-Jan-2008     P00112     PFR00809     TOKEN GLASSES     1-Oct-2008
    1-Jan-2008     P00112     PFR00809     TOKEN GLASSES     1-Nov-2008
    1-Jan-2008     P00112     PFR00809     TOKEN GLASSES     1-Dec-2008
    1-Jan-2008     P00112     PFR00809     TOKEN GLASSES     1-Jan-2009
    1-Jan-2008     P00112     PFR00809     TOKEN GLASSES     1-Feb-2009
    1-Jan-2008     P00112     PFR00809     TOKEN GLASSES     1-Mar-2009
    1-Jan-2008     P00112     PFR00809     TOKEN GLASSES     1-Apr-2009
    1-Jan-2008     P00112     PFR00809     TOKEN GLASSES     1-May-2009
    1-Jun-2009     P00112     PFR00536     MAVALI GLASSES     1-Jun-2009
    1-Jun-2009     P00112     PFR00536     MAVALI GLASSES     1-Jul-2009
    1-Jun-2009     P00112     PFR00536     MAVALI GLASSES     1-Aug-2009
    1-Jun-2009     P00112     PFR00536     MAVALI GLASSES     1-Sep-2009
    1-Jun-2009     P00112     PFR00536     MAVALI GLASSES     1-Oct-2009
    1-Jun-2009     P00112     PFR00536     MAVALI GLASSES     1-Nov-2009
    1-Jun-2009     P00112     PFR00536     MAVALI GLASSES     1-Dec-2009
    1-Jun-2009     P00112     PFR00536     MAVALI GLASSES     1-Jan-2010
    1-Jun-2009     P00112     PFR00536     MAVALI GLASSES     1-Feb-2010
    1-Jun-2009     P00112     PFR00536     MAVALI GLASSES     1-Mar-2010
    1-Jun-2009     P00112     PFR00536     MAVALI GLASSES     1-Apr-2010
    1-Jun-2009     P00112     PFR00536     MAVALI GLASSES     1-May-2010
    1-Jun-2009     P00112     PFR00536     MAVALI GLASSES     1-Jun-2010
    1-Jun-2009     P00112     PFR00536     MAVALI GLASSES     1-Jul-2010
    1-Jun-2009     P00112     PFR00536     MAVALI GLASSES     1-Aug-2010
    1-Jun-2009     P00112     PFR00536     MAVALI GLASSES     1-Sep-2010
    1-Jun-2009     P00112     PFR00536     MAVALI GLASSES     1-Oct-2010
    1-Jun-2009     P00112     PFR00536     MAVALI GLASSES     1-Nov-2010
    1-Jun-2009     P00112     PFR00536     MAVALI GLASSES     1-Dec-2010
    1-Jun-2009     P00112     PFR00536     MAVALI GLASSES     1-Jan-2011
    1-Jun-2009     P00112     PFR00536     MAVALI GLASSES     1-Feb-2011
    1-Jun-2009     P00112     PFR00536     MAVALI GLASSES     1-Mar-2011
    1-Jun-2009     P00112     PFR00536     MAVALI GLASSES     1-Apr-2011
    1-Jun-2009     P00112     PFR00536     MAVALI GLASSES     1-May-2011
    1-Jun-2009     P00112     PFR00536     MAVALI GLASSES     1-Jun-2011

    Hello

    Here's one way:

    WITH     got_month_cnt     AS
    (
         SELECT     effective_month
         ,     dist_id
         ,     shop_id
         ,     shop_name
         ,     MONTHS_BETWEEN ( LEAD ( effective_month
                                  , 1
                              , ADD_MONTHS ( TRUNC (SYSDATE, 'MONTH')
                                           , 1
                                     )
                              ) OVER ( PARTITION BY  dist_id
                                    ORDER BY      effective_month
                                  )
                        , effective_month
                        )     AS month_cnt
         FROM    table_x
    )
    SELECT       c.effective_month
    ,       c.dist_id, c.shop_id, c.shop_name
    ,       ADD_MONTHS ( c.effective_month
                     , m.column_value - 1
                   ) AS shop_month
    FROM             got_month_cnt       c
    CROSS JOIN      TABLE ( CAST ( MULTISET ( SELECT  LEVEL
                                              FROM    dual
                                    CONNECT BY     LEVEL     <= c.month_cnt
                                ) AS sys.odcinumberlist
                     )      ) m
    ;
    

    I'm just guessing at what role (if any) dist_id, shop_id and shop_name play in this issue.

    I hope that answers your question.
    If not, post a small example data (CREATE TABLE and only relevant columns, INSERT statements) and also publish outcomes from these data.
    Explain, using specific examples, how you get these results from these data.
    Always tell what version of Oracle you are using.

    Published by: Frank Kulash, June 8, 2011 17:38

  • How to get the maximum number of days in a month?

    How to get the maximum number of days in a month?

    I use a dateField. where I can get the month. Now, I want to get the maximum number of days in a month.

    How can I get it?

    Please help me. and thanks in advance... []

    NET. RIM. Device.API.util
    Class DateTimeUtilities

    getNumberOfDaysInMonth (int month, int year)
    Returns the number of days in the specified month

    It took me like 10 seconds to find it in the API, I guess you spent more time writing the post...

  • Retrieve the month following the date

    Hi people,

    How can I get the part of months to a date.

    Say, like, I want to get the month part (April = 4) 01/04/2009.

    Thanks in advance!

    Hello

    You can get all parts of a DATE using TO_CHAR.
    For example, on April 1, 2009

    SELECT  TO_CHAR (SYSDATE, 'Month')
    FROM    dual;
    

    product of the results of this

    April
    

    (if you use English) and

    SELECT  TO_CHAR (SYSDATE, 'MM')
    FROM    dual;
    

    produces this output (VARCHAR2)

    04
    
  • How to get the value of DST?

    Hello

    Is there a shortcut to get the value of DST? For example, if the device is in London (for example), while I get back to London DST (+ 2, for example). And if the time zone is not DST, it returns 0 or null.

    I use it now

        int DST = TimeZone.getDefault().getOffset(1, rightnow.get(Calendar.YEAR), rightnow.get(Calendar.MONTH), rightnow.get(Calendar.DAY_OF_MONTH), rightnow.get(Calendar.DAY_OF_WEEK), rightnow.get(Calendar.MILLISECOND));
    

    It does not return the correct value. Thank you!

  • How to get the Date, month, year of the DateTimePicker

    Hi, I am using the DateTimePicker.

    There are several question about this command:

    1. how to get the Date, month and year?

    -With the help of myDateTime.value, I get this string ' Wed May 08 14:45 ICT 2013 '-> I have to manually analyze this? Because I need in format yyyy/mm/dd. Or can set the format of dateTimePicker.value?

    2 format on dateTimePicker self (on the user interface) is d/m/YY, I can't change to another format?

    Thank you

    dateTimePicker.value return a QDateTime not a string.

    https://developer.BlackBerry.com/Cascades/reference/bb__cascades__datetimepicker.html#property-value

    See more:

    https://developer.BlackBerry.com/Cascades/reference/QDateTime.html#date

    https://developer.BlackBerry.com/Cascades/reference/QDate.html

    You can get

    day = dateTimePicker.value.date().day()
    month = dateTimePicker.value.date().month()
    year= dateTimePicker.value.date().year()
    dateYYYYMMDD = dateTimePicker.value.date().toString(Qt::ISODate)
    dateYYYYMMDD2 = dateTimePicker.value.date().toString("YYYY/MM/DD")
    dateYYYYMMDD3 = dateTimePicker.value.toString("YYYY/MM/DD")
    
  • How to order the month values in access guest

    Hi gurus,

    I have a column that displays the month in format below

    Date.png

    I wrote a case statement when 1 = January he worekd, but now I want to display the Jan, Feb... DEC in order, but I do not get the values as expected, any suggessions please.

    Hi gurus,

    I got the answer, I created another logical column based on the above column and sorting of the column value based on the value that it's picking this worked.

    Thanks for your time.

  • How to get the last business day of the previous month?

    Hi all

    We need the user as below,

    If the user select 18 June 2015 ' quick dashboard as the input value, and then they want to see last month last day of work (business date: 29-may-2015) amount in report, if you have an idea please share with us.thanks

    Note:

    use under request we can able to get the last day of the previous month, we want to for the last business day of the last month, based on the date of entry of the user?

    TIMESTAMPADD (SQL_TSI_DAY,-(1), TIMESTAMPADD (SQL_TSI_DAY, DAYOFMONTH ("DIM_TIME". ("" DataDate ") *-(1) + 1,"DIM_TIME ". (("" DataDate "))

    Thank you

    Deva

    Try this,

    case when Dayofweek (timestampadd (sql_tsi_day, Dayofmonth(Date '2015-06-15') *-1, Date ' 2015-06-15')) = 1 then timestampadd (sql_tsi_day, (Dayofmonth(Date '2015-06-15') *-1)-2, Date '' 2015-06-15) when Dayofweek (timestampadd (sql_tsi_day, Dayofmonth(Date '2015-06-15') *-1, Date ' 2015-06-15')) = 7 then timestampadd (sql_tsi_day, Dayofmonth(Date '2015-06-15') *-1-1, Date '' 2015-06-15) another timestampadd (sql_tsi_day, Dayofmonth(Date '2015-06-15') *-1, Date ' 2015-06-15') end

    As Ftsiot said in this post, it will work only to exclude the sat and Sun. Another one if you want to exclude regional holiday, you may need a calendar in DB table.

    Thank you

    AJ

  • How to get the desired result when subsequent month is not available

    WITH T1
         AS (SELECT 'A' COL1,
                    'B' COL2,
                    'C' COL3,
                    '01-Jan-2015' DT,
                    10 QTY
               FROM DUAL
             UNION
             SELECT 'A' COL1,
                    'B' COL2,
                    'C' COL3,
                    '01-feb-2015' DT,
                    20 QTY
               FROM DUAL
             UNION
             SELECT 'A' COL1,
                    'B' COL2,
                    'C' COL3,
                    '01-mar-2015' DT,
                    30 QTY
               FROM DUAL
             UNION
             SELECT 'A' COL1,
                    'B' COL2,
                    'C' COL3,
                    '01-may-2015' DT,
                    40 QTY
               FROM DUAL
             UNION
             SELECT 'A1' COL1,
                    'B1' COL2,
                    'C1' COL3,
                    '01-mar-2015' DT,
                    40 QTY
               FROM DUAL
             UNION
             SELECT 'A1' COL1,
                    'B1' COL2,
                    'C1' COL3,
                    '01-may-2015' DT,
                    40 QTY
               FROM DUAL)
    SELECT *
      FROM t1
    
    

    Current output:

    COL1COL2COL3DTQTY.
    ABCJanuary 1, 201510
    ABCFebruary 1, 201520
    ABC01-mar-201530
    ABC01-may-201540
    A1B1C101-mar-201540
    A1B1C101-may-201540

    Expected results

    COL1COL2COL3DTQTY.DTREQ_VAL
    ABC01/01/20151001/01/201520
    ABC01/02/20152001/02/201530
    ABC01/03/20153001/03/20150
    ABC01/05/20154001/05/20150
    A1B1C101/03/20154001/03/20150
    A1B1C101/05/20154001/05/20150

    Logic:

    If we COL1, COL2, COL3 combination for A, B, C, we have the quantity for 1 January, 1 February, 1 March, 1 may, and we don't have quantity for April 1 and June 1. I need following QUANTITY value as another column. If I use the lead, I'll get the value from May 1st to March 1st, but I want to value 0 because it is after March either.

    What I've tried so far:

    SELECT *
      FROM (WITH T1
    AS (SELECT 'A' COL1,
    'B' COL2,
    'C' COL3,
    '01-Jan-2015' DT,
    10 QTY
    FROM DUAL
    UNION
    SELECT 'A' COL1,
    'B' COL2,
    'C' COL3,
    '01-feb-2015' DT,
    20 QTY
    FROM DUAL
    UNION
    SELECT 'A' COL1,
    'B' COL2,
    'C' COL3,
    '01-mar-2015' DT,
    30 QTY
    FROM DUAL
    UNION
    SELECT 'A' COL1,
    'B' COL2,
    'C' COL3,
    '01-may-2015' DT,
    40 QTY
    FROM DUAL)
            SELECT COL1,
     COL2,
     COL3,
    TO_DATE (T1.DT) DT,
    NVL (QTY, 0) QTY,
     MONTHS.DT ALL_DATES,
     LEAD (NVL (QTY, 0), 1, 0) OVER (ORDER BY MONTHS.DT) REQ_VAL
              FROM T1,
    (    SELECT ADD_MONTHS (TO_DATE ('01-jun-2015'), LEVEL - 6) DT
    FROM DUAL
    CONNECT BY LEVEL <= 12) MONTHS
             WHERE MONTHS.DT = T1.DT(+))
    WHERE DT ISNOTNULL;
    
    
    
    
    
    

    My query works for a set of COL1, COL2, COL3, am looking how we can achieve multiple COL1, COL2, COL3 (or) otherwise better query writing.

    Thanks for your suggestions in advance.

    Thank you

    Now, to understand your condition: your additional column must indicate the amount of the next month, or zero if it is not a record for the month. How about this?

    WITH T1

    AS (SELECT 'A' COL1,)

    'B' COL2,

    COL3 'C ',.

    To_date('01-Jan-2015','dd-mon-yyyy') DT,

    QTY 10

    OF THE DOUBLE

    UNION

    SELECT 'A' COL1,

    'B' COL2,

    COL3 'C ',.

    To_date('01-Feb-2015','dd-mon-yyyy') DT,

    QTY. 20

    OF THE DOUBLE

    UNION

    SELECT 'A' COL1,

    'B' COL2,

    COL3 'C ',.

    To_date('01-Mar-2015','dd-mon-yyyy') DT,

    QTY 30

    OF THE DOUBLE

    UNION

    SELECT 'A' COL1,

    'B' COL2,

    COL3 'C ',.

    To_date('01-May-2015','dd-mon-yyyy') DT,

    QUANTITY 40

    OF THE DOUBLE

    UNION

    SELECT 'A1' COL1,

    COL2 "B1."

    COL3 "C1"

    To_date('01-Mar-2015','dd-mon-yyyy') DT,

    QUANTITY 40

    OF THE DOUBLE

    UNION

    SELECT 'A1' COL1,

    COL2 "B1."

    COL3 "C1"

    To_date('01-May-2015','dd-mon-yyyy') DT,

    QUANTITY 40

    THE DOUBLE)

    X.Col1, x.col2, x.col3, x.dt, x.qty, NVL(y.qty,0) SELECT req_val

    THE t1 x

    LEFT OUTER JOIN t1 y

    ON y.col1 = x.col1

    AND y.col2 = x.col2

    AND y.col3 = x.col3

    AND y.dt = add_months(x.dt,1)

    ORDER BY 1,2,3,4

    My query works for a DFU, am looking how we can achieve multiple UTD

    What is a DFU?

  • How to get the balance of an element value

    Hello

    I have a requirement to obtain related information with balance. I am able to read the information on the element except balance.how to get the value of the particular item balance.

    for the application-> transfer and process-> queries with trust-> value the month selected and chosen balances button and queries with the obtained item name break it down the value of the balance.

    These values I want in my query.i tried backend with calling package by passing parameters like the number of transfer, balance the id and date but iam getting value "0".

    IAM new to hrms, Please help me on how to get this balance of values

    Thank you

    Hello

    It is not very clear what you want to display in the form of balance for a given range of dates.

    It depends on how you have configured your balances and periods and balance which you are referring.

    The API allows for a given only date that matches the date earned.

    Say, for example, that you have a "basic salary" defined with a "Treatment period assignment to Date" dimension and feed of the element that corresponds to the base salary.

    "If you need get the 'wage base Total' (balance?) for the period February 1, 2015 ' to March 31, 2015", then you need get dates earned for payroll passes made during that period and call the package above with the appropriate settings.

    Another way is by querying the tables/views directly: you can use, for example - it's perhaps easier to your situation:

    Select sum (nvl (pbv.value, 0))

    of pay_balance_values_v the VB.

    where pbv.balance_name = 'base salary.

    and pbv.database_item_suffix = '_ASG_PTD. '

    and pbv.assignment_id =

    and pbv.effective_date between to_date (' 01/02/2015 ',' dd/mm/yyyy')

    and to_date (' 31/03/2015 ',' dd/mm/yyyy');

    Kind regards
    Rajen

  • Get the number of days in a month based on the month and year of fields

    I have a column in my form which lists the days in a month. I want to configure a hidden field that calculates the total number of days in a month, based on the month and year of the field inputs. The number of days will determine what appears on the column. For example, if I put 4 months, and 2016 in the field of the year, I get 30 in the hidden field. Thus, on the column 'Day', I'll have numbers 1-30. Or if I put 2 months and 2016 in the field of the year, I get the 29 in the hidden field. If the numbers 1-29 appears in the column 'day '.

    Found this on some forum javascript code:

    //Month is 1 based
    function daysInMonth(month,year) {
      
    return new Date(year, month, 0).getDate();
    }

    //July
    daysInMonth
    (7,2009); //31
    //February
    daysInMonth
    (2,2009); //28
    daysInMonth
    (2,2008); //29

    I do not know how to convert this code in JavaScript to adobe and don't really know how to use it. All I know how to do is to configure the field values for the field month and year as variables. I am a novice programmer and would appreciate it really all the help I can get. Thank you in advance!

    The code seems to be JavaScript and runs as needed by using the JavaScript console.

    I would like to consider making more general code, so if you have a date string that includes at least the month and year we could just call the function and get the number of days for that month.

    The following script will calculate the number of days in a month, by using at least the month and year values can display the result on the JavaScript console and all of the value field for the field that has this code as the custom calculation Script.

    function daysInMonth (oDate) {}
    return new Date (oDate.getFullYear (), oDate.getMonth () + 1, 0) .getDate ();
    }

    nMonth var = this.getField("Month").valueAsString; get the value of month;
    nYear var = this.getField("Year").valueAsString; get the value of the year;

    Event.Value = "";

    If (nMonth! = "" & nYear!) = "") {}
    var MyDate = util.scand ("' / mm/yyyy ', nMonth +" / "+ nYear); convert to date object;
    var nDaysInMonth = daysInMonth (MyDate); get the number of days;

    Console.Open (); Open the JavaScript console;

    Console.clear(); clear the console;

    Console.println ("Days in" + nMonth + ":" + nDaysInMonth); show days in month;

    Event.Value = nDaysInMonth; Set the value of the field;

    }

Maybe you are looking for