Julian date function.....

Is there any built in function in Oracle to get the Julian date for a given date?
Or if you have written a good function to accomodate the same plese share.
Example:
20080923 = getJulianDate(Today's date in date data type)
Thank you,
Smith

First link found when i asked for
Oracle Julian Date
http://www.psoug.org/reference/date_func.html
You may think to do a little research before posting questions here.

Similar Messages

  • Function module to convert calender date to Julian date format

    Hi,
    Is there any FM which can convert Calendaer Date to <b>Julian Date</b> format?
    Thanks.
    Regards,
    Madhu

    It is not a func mod... but it is pretty straight forward.
    data: julian_day(3) type n,
    date_aux type d,
    date_I_need type d.
    first day of the year
    concatenate date_I_need(4) '0101' into date_aux.
    julian_day = date_I_need - date_aux.
    julian_day = julian_day + 1.

  • Julian Date Conversion (Dublin Julian)

    Hi,
    I'm working with BO Designer and am connecting to an AS400 database that uses Dublin Julian for the date field.  I'm trying to get the Dublin Julian format to the YYYY-MM-DD format.  Currently, the Dublin Julian is formatted as a 5 digit number field.  For example, 2011-01-31 would be represented as 40574.  I believe the epoch, or start count day for the Dublin Julian day fell on Sunday, December 31, 1899.  Can anyone help me with this calculation within Designer?
    Thank you,
    Tyler

    You should be able to convert the 5 digit integer to a date by using the date function within the Crystal Reports Designer tool.  The formula could look like this:
    date(.)

  • Oracle Julian Date

    I have an oracle date like this 1112260180
    How can I change this to a date time so i can use a Min or Max function ?

    Hi,
    4e0dd858-387a-40ef-a3b0-de1fbd458a2c wrote:
    I have an oracle date like this 1112260180
    How can I change this to a date time so i can use a Min or Max function ?
    Why can't you use MIN or MAX on the original number, without converting it?
    Whenever you have a question, please post a little sample data (CREATE TABLE and INSERT statements), so the people who want to help you can re-create the problem and test their ideas.  Also post the results you want from that data, and an explanation of how you get those results from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
    See the forum FAQ https://forums.oracle.com/message/9362002#9362002
    As Hoek said, are you sure that's a Julian date?  Oracle DATEs only go up to Julian date 5373484.

  • Need Func Mod that provides Julian Date

    Hi,
    Anyone aware of a Function Module that will provide Julian dates?
    Thanks.

    Hi,
    Heres a small piece of code that will convert date into julian date and vice versa.
    YYYYMMDD to JULIAN FORMAT
    *Convert Date into Julian format yynnn
    report z_date_to_julian.
    data : v_i type i.
    data : v_n(3) type n.
    data : v_julian(5) type n.
    data : date1 like sy-datum.
    parameters : p_date like sy-datum.
    concatenate p_date(4) '0101' into date1.
    v_i = p_date - date1 + 1.
    move : v_i to v_n.
    concatenate p_date+2(2) v_n into v_julian.
    write :/ 'Date -',  p_date.
    write :/ 'Julian -' , v_julian.
    JULIAN DATE to YYMMDD format
    parameters : p_julian(5) obligatory.
    move : p_julian(2) to v_yy.
    move : p_julian+2(3) to v_days.
    do 12 times.
      move : sy-index to v_mm.
      move : v_mm to v_month.
      move : v_yy to v_butag.
      call function 'NUMBER_OF_DAYS_PER_MONTH_GET'
           exporting
                par_month = v_month
                par_year  = v_butag
           importing
                par_days  = v_days_month_n.
      move : v_days_month_n to v_days_month.
      v_diff = v_days - v_days_month.
      if v_diff le 0.
        move : v_days to v_dd.
        concatenate v_yy v_mm v_dd into v_output.
        exit.
      else.
        v_days = v_diff.
      endif.
    enddo.
    write :/ 'Input' , p_julian.
    write :/ 'Output', v_output.
    Hope this is useful..
    Reward if helpfull...
    Cheers,
    Sowjanya.

  • Re: About Date Functions

    Vansuypeene Laurent wrote:
    >
    Hello Forte Users,
    I'm looking for a function that returns the number of the week
    in the year (from 1 to 53) and the number of the day in the year (from 1
    to 365).
    Has anyone written it ?
    Thanks
    L. VANSUYPEENE
    e-mail : [email protected]
    Try this code for day of year
    DayOfYear :
    -------------------------START OF CODE--------------------------------
    dtd1,dtd2 : DateTimeData = new;
    df: dateformat = new(template = 'd/m');
    -- Set dtd1 to 1 januari
    dtd1 = df.decodedate('1/1');
    dtd2.SetCurrent();
    intd : IntervalData = new;
    intd.SetUnit(months = dtd2.GetUnit(DR_MONTH) - 1,
    days = dtd2.GetUnit(DR_DAY));
    -- Normalize : calculate days starting from dtd1
    intd.Normalize(dtd1);
    return intd.GetUnit(DR_DAY);
    -------------------------END OF CODE--------------------------------
    Try this code for week of year :
    Week of Year :
    -------------------------START OF CODE--------------------------------
    OFFSET_WEEKDAY : Integer = 6;
    THURSDAY : Integer = 4;
    wd : DateTimeData;
    jul_31dec : Integer;
    wd_1jan : Integer;
    jul_mon1 : Integer;
    yr : Integer;
    mn : Integer;
    dy : Integer;
    jul : Integer;
    weeknr : Integer;
    month_cm_365 : Array of IntegerData = new;
    month_cm_365[1] = IntegerData(value=0);
    month_cm_365[2] = IntegerData(value=31);
    month_cm_365[3] = IntegerData(value=59);
    month_cm_365[4] = IntegerData(value=90);
    month_cm_365[5] = IntegerData(value=120);
    month_cm_365[6] = IntegerData(value=151);
    month_cm_365[7] = IntegerData(value=181);
    month_cm_365[8] = IntegerData(value=212);
    month_cm_365[9] = IntegerData(value=243);
    month_cm_365[10] = IntegerData(value=273);
    month_cm_365[11] = IntegerData(value=304);
    month_cm_365[12] = IntegerData(value=334);
    month_cm_366 : Array of IntegerData = new;
    month_cm_366[1] = IntegerData(value=0);
    month_cm_366[2] = IntegerData(value=31);
    month_cm_366[3] = IntegerData(value=60);
    month_cm_366[4] = IntegerData(value=91);
    month_cm_366[5] = IntegerData(value=121);
    month_cm_366[6] = IntegerData(value=152);
    month_cm_366[7] = IntegerData(value=182);
    month_cm_366[8] = IntegerData(value=213);
    month_cm_366[9] = IntegerData(value=244);
    month_cm_366[10] = IntegerData(value=274);
    month_cm_366[11] = IntegerData(value=305);
    month_cm_366[12] = IntegerData(value=335);
    wd = new;
    wd.SetValue(dateTimeData().SetCurrent().Value);
    yr = wd.GetUnit(DR_YEAR);
    mn = wd.GetUnit(DR_MONTH);
    dy = wd.GetUnit(DR_DAY);
    -- always needed : the julian date of 31 december of the
    -- previous year
    jul_31dec = 365 * (yr - 1) + (yr - 1) / 4
    - (yr - 1) / 100
    + (yr - 1) / 400;
    begin
    -- calculate the julian date
    yd : Integer; -- days in current year
    yr_366 : Boolean;
    yr_366 = ( (yr % 400) = 0 ) OR
    ( ((yr % 4) = 0) AND ((yr % 100) <> 0));
    if yr_366 then
    yd = month_cm_366[mn].Value + dy;
    else
    yd = month_cm_365[mn].Value + dy;
    end if;
    jul = yd + jul_31dec;
    end;
    wd_1jan = (jul_31dec + 1 + OFFSET_WEEKDAY) % 7 + 1;
    if ( wd_1jan <= THURSDAY) then
    jul_mon1 = jul_31dec + 1 - wd_1jan + 1;
    else
    jul_mon1 = jul_31dec + 1 - wd_1jan + 1 + 7;
    end if;
    weeknr = (jul - jul_mon1 + 7) / 7;
    -- Treat the special cases : week 0 and 53
    if ( weeknr = 0 ) then
    -- calculate the julian date of the first monday of 2
    -- years ago and use this to calculate the week number
    jul_31dec : Integer = 365 * (yr-2)
    + (yr-2) / 4
    - (yr-2) / 100
    + (yr-2) / 400;
    wd_1jan = (jul_31dec + 1 + OFFSET_WEEKDAY) % 7 + 1;
    if ( wd_1jan <= THURSDAY ) then
    jul_mon1 = jul_31dec + 1 - wd_1jan + 1;
    else
    jul_mon1 = jul_31dec + 1 - wd_1jan + 1 + 7;
    end if;
    weeknr = (jul - jul_mon1 + 7) / 7;
    end if;
    if ( weeknr = 53 ) then
    -- week 53 of this year or week 1 of the next year
    -- calculate the weekday of january 1st of the next year
    -- and decide week 1 or 53
    jul_31dec : Integer = 365 * yr
    + yr / 4
    - yr / 100
    + yr / 400;
    wd_1jan = (jul_31dec + 1 + OFFSET_WEEKDAY) % 7 + 1;
    if ( wd_1jan <= THURSDAY ) then
    weeknr = 1;
    end if;
    end if;
    return weeknr;
    -------------------------END OF CODE--------------------------------
    Thanks to Franky De Lamper of Cap Gemini
    Steven Arijs
    [email protected]

    e.g.
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select to_date('15-may-1982', 'dd-mon-yyyy') as dt from dual union all
      2             select to_date('24-may-1982', 'dd-mon-yyyy') from dual)
      3  -- END OF TEST DATA
      4  select dt,
      5         round(dt,'mm') as rnd_date,
      6         trunc(dt,'mm') as trnc_date
      7* from t
    SQL> /
    DT          RND_DATE    TRNC_DATE
    15-MAY-1982 01-MAY-1982 01-MAY-1982
    24-MAY-1982 01-JUN-1982 01-MAY-1982
    SQL>Note: In case you didn't realize, rounding will round dates as with numbers (up or down), and you should use TRUNC if you want to remove the day portion (i.e. truncate to the start of the month)

  • Data Federator Universe Date Functions

    Hi,
    I created a Data Federator Universe from target tables (Source Tables from: Sql Server 2005 and Oracle 10g). Now, I want to create a object in the universe: "Days between 2 dates"(coming from 2 different target tables). I don't see any other date functions other than CURDATE(). How to create my object?
    Alternatively, Can I create a caliculated column in the existing target table? For Example, I want to create a new column "Days between 2 Dates" from 2 different tables by using a formula in Default mapping of the target table.
    Thanks & Regards,
    Peter

    Hi Amit,
    Thanks for your reply.
    Ok. So, Universe on top of Data Federator has limited functionality.
    And, other option you mentioned is on report level. I am creating an adhoc universe and I have few objects which will calculate days between 2 dates coming from 2 different tables.
    But, how can I achieve this on Data Federator level. I have no function there to find Days Between 2 dates. I see lot of time and date functions but not the one I required. Also, I added a column in the target table and tried to apply the formula there in the default mapping area. But, I see only the selected target table. I need another date column from another table, which is not displayed in the default mapping area.
    How can I achieve this?
    Regards,
    -Peter

  • Print a DayName without using Date functions

    Hi,
    I have an assignment like without using any date functions i should print a calendar.
    Below is the code without using any datefunctions like dateadd, datediff, datename a calendar has been generated for month and year entered. I want a week name for the dates like sunday ... monday etc. 
    I can take any date from calendar as reference  and calculate based on that date.
    ex: today is 2/20/2014 thursday . Next 7days again will be thursday, same way before 7days will be thursday.
    I need to loop in below procedure and get weekname. 
    Plz help in the code,
    I am using SQL server 2008
    IF OBJECT_ID ('dbo.Calendar1') IS NOT NULL
         DROP PROCEDURE dbo.Calendar1
    GO
    CREATE  PROCEDURE [dbo].Calendar1 --4,1991
       @month int,
       @Year  int
     AS  
     BEGIN
     declare 
     @startdateofMonthYear date,
     @EnddateofMonthYear Date
    Set @startdateofMonthYear=(Select cast(@Year as varchar(4)) +'-'+Right('00'+Cast(@month as varchar(2)),2) +'-'+'01')
    Set @EnddateofMonthYear = (SELECT case when @month IN (1,3,5,7,8,10,12) then cast(@Year as varchar(4)) +'-'+Right('00'+Cast(@month as varchar(2)),2) +'-'+'31'
    when @month IN(4,6,9,11) then cast(@Year as varchar(4)) +'-'+Right('00'+Cast(@month as varchar(2)),2) +'-'+'30'
    else  cast(@Year as varchar(4)) +'-'+Right('00'+Cast(@month as varchar(2)),2) +'-'+(CASE WHEN (@YEAR % 4 = 0 AND @YEAR % 100 <> 0) OR @YEAR % 400 = 0 THEN '29' else '28' End) 
    End) 
    ;WITH CTE_DatesTable
    AS
    Select 1 daysint, Cast(SUBSTRING(cast(@startdateofMonthYear as varchar(20)),1,7) + '-'+CAST(1 as varchar(2)) as DATE) Calendardates
    UNION ALL
    SELECT   daysint+1,Cast(SUBSTRING(cast(@startdateofMonthYear as varchar(20)),1,7) + '-'+CAST(daysint+1 as varchar(2)) as DATE) Calendardates
    FROM CTE_DatesTable
    WHERE  daysint<= 
    (SELECT case when @month IN (1,3,5,7,8,10,12) then 31
    when @month IN(4,6,9,11) then 30
    else  (CASE WHEN (@YEAR % 4 = 0 AND @YEAR % 100 <> 0) OR @YEAR % 400 = 0 THEN 29 else 28 End) 
    End)-1
    Select 
    [DWDateKey]=Calendardates,
    [DayDate]=daysint,
    [MonthNumber]=@Month,
    [MonthName]=Case when @month = 1 then 'January'
     when @month  = 2 then 'February'
     when @month  = 3 then 'March'
     when @month  = 4 then 'April'
     when @month  = 5 then 'May'
     when @month  = 6 then 'June'
     when @month  = 7 then 'July'
     when @month  = 8 then 'August'
     when @month  = 9 then 'September'
     when @month  = 10 then 'October'
     when @month  = 11 then 'November'
     when @month  = 12 then 'December' 
    End,
    [Year]=@Year
    From CTE_DatesTable
    END
    bhavana

    In the above code, where do i pass the year and month?
    (Select 2000 YearID
    Union All
    Select YearID +1 From cte where YearID <2100
     In above condition from 2000 year its displaying.
    If i want in 90's year , Day name will not be correct.
    Deepa

  • Date function doesn't work in Message Subject when scheduling batch

    Hi,
    When I was scheduling a batch and went to PDF attached E-Mail panel, in the Message Subject line I added a function <<Date(yyyy-MM-dd)>>,but when the email was sent, the date function in the subject didn't show the actual date, just showed the original function text <<Date(yyyy-MM-dd)>>, Is there anyone can help on this? Thanks in advance.

    Hi,
    Can I know the Hyperion Version you referring ?
    regards,
    Harish.

  • Date Functions( first day of a month that is 3 months from now....)

    I have recently written my first stored procedure.
    Its rather a bunch of SQL statements.
    I had to hard code lot of dates. most of them are first day of the current monthe or last day of current month etc.
    I thot of parametrizing all the dates, but if a business person has to include all the parameters they could go wrong and get the wrong results.
    Now, I want to use date functions to achieve these requirements:
    Can any one please throw some insght into this:....
    1) First day of current month,
    2) last day of current month.
    3) first day of previious month
    4) last day of previous month
    5) first day of a month that is 3 months from now.
    6) last day of a month that is 3 months from now.
    7).....
    Can any one please throw some light on any one of this.. I can try to work from there onwards ....
    Thanks a lot in advance,
    Ac

    Hi there,
    1) First day of current month
    select trunc(sysdate, 'MM') from dual;
    2) last day of current month.
    select trunc(add_months(sysdate, 1), 'MM') - 1 from dual;
    3) first day of previious month
    select trunc(add_months(sysdate, -1), 'MM') from dual;
    4) last day of previous month
    select trunc(sysdate, 'MM') - 1 from dual;
    5) first day of a month that is 3 months from now.
    select trunc(add_months(sysdate, 3), 'MM') from dual;
    6) last day of a month that is 3 months from now.
    select trunc(add_months(sysdate, 4), 'MM') - 1 from dual;cheers,
    Anthony

  • Problem overloading "set data" function on Button DataGrid Renderer

    Hi all, I'm hoping this is something simple.
    I have a class that extends mx.controls.Button and implements mx.core.IDataRenderer.  I need to set the button icon whenever the Data property is set from the DataGrid.  My problem is that my overloaded set/get Data function are never called (I've stepped through the code in debug).  Instead the set/get functions in Container.as (Flex 3.4 SDK) get called.
    Here's the basics code:
    exportButtonRenderer.as
    package controls
        import flash.events.Event;
        import flash.events.MouseEvent;
        import mx.controls.Button;   
        import mx.core.IDataRenderer;
        import mx.controls.dataGridClasses.DataGridListData;   
        import mx.controls.listClasses.BaseListData;
        import mx.events.FlexEvent;
        import mx.controls.Alert;
        import model.descriptors.compDescriptor;
        import events.exportClickedEvent;   
        public class exportButtonRenderer extends Button implements IDataRenderer   
            //    embed your icons
            [Embed(source='/assets/icons/export.png')]
            [Bindable]
            public static var imageExport:Class;
            [Embed(source='/assets/icons/blank.png')]
            [Bindable]
            public static var imageBlank:Class;
            public function exportButtonRenderer()
                super();
            private var _listData:DataGridListData;
            override public function get listData():BaseListData
                return _listData;
            override public function set listData(value:BaseListData):void
                _listData = DataGridListData(value);
            private var _data:Object;       
            override public function get data():Object
                return _data;
            override public function set data(value:Object):void
                _data = value;
            override protected function clickHandler(event:MouseEvent):void
                super.clickHandler(event);   
    Now I know I'm using the Flexlib TreeGrid and not a standard DataGrid but when I trace through all the code all code firing the set/get functions is coming from the DataGrid anyway.
    Here's the my Grid def in my main app mxml:
    Header 1
    <flexlib:TreeGrid
            id="MKTXGrid"
            dragEnabled="false" sortableColumns="false" showRoot="false"
            disclosureClosedIcon="@Embed(source='/assets/icons/arrow_right.png')"
            disclosureOpenIcon="@Embed(source='/assets/icons/arrow_down.png')"
            folderOpenIcon="@Embed(source='/assets/icons/psd.png')"
            folderClosedIcon="@Embed(source='/assets/icons/psd.png')"       
            click="MKTXGrid_clickHandler(event)"
             doubleClickEnabled="true" doubleClick="MKTXGrid_doubleClickHandler(event)" left="0" right="0" top="0" bottom="16">
        <flexlib:columns>
                <flexlib:TreeGridColumn dataField="Name" headerText = "Name" minWidth="200" width="200" editable="true"/>
                <mx:DataGridColumn dataField="ExportName" headerText = "Export Name"/>
                <mx:DataGridColumn dataField="Export" headerText = "Export" width="50" minWidth="20" resizable="false">
                 <mx:itemRenderer>
                    <mx:Component>
                        <mx:Box horizontalAlign="center" width="100%" verticalScrollPolicy="off" horizontalScrollPolicy="off">
                            <controls:exportButtonRenderer label="Export" icon="@Embed(source='assets/icons/export.png')" width="12" height="12" useHandCursor="true">                        
                                <controls:click>
                                    <![CDATA[
                                        import events.exportClickedEvent;
                                        var e:exportClickedEvent = new exportClickedEvent();
                                        e.itemData = data;
                                        dispatchEvent(e);
                                    ]]>
                                </controls:click>
                            </controls:exportButtonRenderer>
                        </mx:Box>
                    </mx:Component>
                </mx:itemRenderer>
                </mx:DataGridColumn>
            </flexlib:columns>
        </flexlib:TreeGrid>
    Nothing too special going on.
    I know this can be done, I've seen examples in the SDK:
    http://opensource.adobe.com/svn/opensource/durango/trunk/ExternalFlexTools/com/dougmccune/ containers/accordionClasses/AccordionHeader.as
    By the way I've stepped through the code of the TreeGridItemRenderer class in Flexlib which works correctly and the class def starts like this:
    TreeGridItemRenderer.as
    import flash.display.DisplayObject;
    import flash.display.InteractiveObject;
    import flash.display.Shape;
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.events.MouseEvent;
    import flash.geom.Point;
    import flash.geom.Rectangle;
    import flexlib.controls.TreeGrid;
    import mx.controls.Image;
    import mx.controls.dataGridClasses.DataGridListData;
    import mx.controls.listClasses.BaseListData;
    import mx.controls.listClasses.IDropInListItemRenderer;
    import mx.controls.listClasses.IListItemRenderer;
    import mx.core.IDataRenderer;
    import mx.core.IFlexDisplayObject;
    import mx.core.IToolTip;
    import mx.core.SpriteAsset;
    import mx.core.UIComponent;
    import mx.core.UITextField;
    import mx.events.FlexEvent;
    import mx.events.ToolTipEvent;
    import mx.events.TreeEvent;
    import mx.managers.ILayoutManagerClient;
    import mx.styles.IStyleClient;
    public class TreeGridItemRenderer extends UIComponent
                                      implements IDataRenderer,
                                                   IDropInListItemRenderer,
                                                 ILayoutManagerClient,
                                                   IListItemRenderer
    Any help would be great!

    That's because you put your component in a Box.  The DataGrid is setting the Box's .data property and no code is setting the one on your component.  You shouldn't really need Box.  You can override updateDisplayList to center your Button instead.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Help with Date function in sql query....

    My question I guess is really 2...I'm trying to use the date function as a comparison in my WHERE clause in my sql command.
    1. My date format is dd-MMM-yy eg. (01-Apr-06) ... my problem is the Apr is lower case where my field in the database is 01-APR-06 so when I compare 01-Apr-06 to 01-APR-06 is doesnt find any rows. Is there away that I can make the Apr all upper case so that it is APR.
    2. My second problem is getting this "date" field to work in my sql stmt I keep getting errors and it works fine if I take my attempts at trying to compare the date.
    --------------Date Code----------------------------------------------------------
    <%!
    String getFormattedDate(java.util.Date d)
    SimpleDateFormat simpleDate = new SimpleDateFormat("01-MMM-yy");
    return simpleDate.format(d);
    %>
    <%
    java.util.Date d = new java.util.Date();
    String dateString = getFormattedDate (d);
    %>
    ---------------------------Sql statment------------------------------------------
    ResultSet rset = stmt.executeQuery ("SELECT name " + " FROM table where rdate = '01-APR-06' order by name ");
    Currently Im just hard coding the date but I need to make it so it uses the date code...so....
    rdate should equal the date from the formatted date in upper case
    something like
    rdate = <%= dateString %>
    Thanks in advance for any ideas anyone may have...

    There are sql functions upper & lower.
    SELECT name  FROM table where upper(rdate) = '01-APR-06' order by name Or you could convert the date to a string, and use the toUpperCase & toLowerCase java.lang.String methods. It doesn't make much of a difference--do you want the java compiler to do the string conversion or the database?

  • How to  use data function using characterstics variable for calculation on

    how to  use data function using characterstics variable for calculation on  attribute as key figure

    Hi Gayatri
    Did you not see my answer for CASE because CASE does indeed offer the use of the BETWEEN clause, but DECODE does not. Let me give you a little synopsis of DECODE.
    In its most simple form it takes 4 values and looks like this: DECODE(A, B, C, D)
    This essentially means, IF A = B THEN C ELSE D
    The trick to solving BETWEEN in a DECODE is to work out algoriths where A = B. Because we don't know how many values are between 00 and 99, although I could guess there were 100 we could of course have 100 parts in the DECODE but that would be awful. How about if we look at it another way and say this:
    IF PART_NUMBER < 'SDK00' THEN pay_amount
    ELSE IF PART_NUMBER > 'SDK99' THEN pay_AMOUNT
    ELSE pay_amount + 100
    This statement only had 2 hard coded values, but how to make DECODE work with less than? Easy, we use the LEAST function. The LEAST function takes 2 values and returns the one with the lowest value. So I use LEAST(PART_NUMBER, 'SDK00') then whenever the PART_NUMBER is lower than SDK00 it will be true. A similar situation exists for the opposite function GREATEST. Putting all of this together then, you can do this:
    DECODE(PART_NUMBER, GREATEST(PART_NUMBER, 'SDK00'), DECODE(PART_NUMBER, LEAST(PART_NUMBER, 'SDK99'), PAY_AMOUNT * 100, PAY_AMOUNT), PAY_AMOUNT)
    In English this can be read as follows:
    IF the PART_NUMBER is greater than or equal to SDK00 and the PART_NUMBER is less than or equal to SDK99 THEN PAY_AMOUNT x 100 ELSE 0
    Best wishes
    Michael

  • Conversion from YYYYMMDD to Julian Date in BPEL

    Hi,
    My requirement is to convert date format from YYYYMMDD to Julian Date (CYYDDD) in BPEL.
    C - Stands for Century
    Would like to know a way to achieve this conversion in BPEL. Please suggest.
    Appreciate your quick help.
    Thanks
    Priyanka G

    Hi,
    I suggest you use a java activity for that... There are many examples in java on how to convert a date to julian...
    Cheers,
    Vlad

  • DATE function to get name of day for a Date given?

    hi guys,
    can anyone tell me what is the DATE function to get the name of day for a date given
    (12/dec/2004)---returns SUNDAY

    Hi peter
    Your Query will return an error.
    SQL> select to_char(to_date('12/dec/2004', 'mm/mon/yyyy'), 'DAY')from dual;
    select to_char(to_date('12/dec/2004', 'mm/mon/yyyy'), 'DAY')from dual
    ERROR at line 1:
    ORA-01816: month may only be specified once.
    month is specified twice.
    select to_char(to_date('12/dec/2004', 'dd/mon/yyyy'), 'DAY')from dual;
    Regards
    Sasidhar.P

Maybe you are looking for

  • Pl/Sql interaction with MQSeries

    Hi, How do you put/get message from a MQSeries queue i ahve pl/sql procedure which has to connect to a MQSeries queue. It would be great if i can get a code sample Thanks And Regards Ravi/Dheeraj

  • Could some one please tell me how to take screen shot?

    I was prompted once by the computer to take a screen shot. Now I can't figure out how to do it again.

  • Iexpense Page in OAF

    Hi all, While creating a Expense Report in "Create Expense Report: Cash and Other Expenses ",after filling the details in in lines like Date,Receipt Amount,Exchange Rate,Expense Type,Justification and required fields in Details when i press the next

  • Re installation win 8

    i have re installed my windows 8.1 with out back up ...it had important files is it possible to recover all those files

  • When will my OS X Yosemite redemption code be sent?

    I signed up for a redemtion code of OS X Yosemite right after the presentation ended and the website was opened up, when will i recieve my code?